Config refactor. Plugins now using config

This commit is contained in:
Hash Borgir
2024-02-14 00:12:40 -07:00
parent 2277dd1b90
commit bb331092d0
17 changed files with 33 additions and 877 deletions

View File

@@ -8,7 +8,7 @@ import datetime
import logging
import simplematrixbotlib as botlib
async def handle_command(room, message, bot, PREFIX, config):
async def handle_command(room, message, bot, prefix, config):
"""
Function to handle the !date command.
@@ -19,7 +19,7 @@ async def handle_command(room, message, bot, PREFIX, config):
Returns:
None
"""
match = botlib.MessageMatch(room, message, bot, PREFIX)
match = botlib.MessageMatch(room, message, bot, prefix)
if match.is_not_from_this_bot() and match.prefix() and match.command("date"):
logging.info("Fetching current date and time")
current_datetime = datetime.datetime.now()