mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 09:16:19 +00:00
refactor(help.py, settings.py): remove debug import and debug statements
feat(settings.py): add ctx_to_guid function to convert context to guild id for database queries feat(settings.py): add support for changing the model used by the bot fix(settings.py): fix images command not updating the database correctly feat(cogs/setup.py): add dms_only check to setup_dms command refactor(cogs/setup.py): move ctx_to_guid function to config.py refactor(cogs/setup.py): move mg_to_guid function to config.py feat(makeprompt.py): add support for DMs conversations fix(makeprompt.py): fix images setting retrieval from database fix(makeprompt.py): fix guild_id to guid conversion in database queries refactor(makeprompt.py): extract historicator function to get the channel or user of a message refactor(makeprompt.py): remove debug statements and unused variables
This commit is contained in:
@@ -23,8 +23,18 @@ def debug(message):
|
||||
else:
|
||||
print(message)
|
||||
|
||||
def ctx_to_guid(ctx):
|
||||
if ctx.guild is None:
|
||||
return ctx.author.id
|
||||
else:
|
||||
return ctx.guild.id
|
||||
|
||||
def mg_to_guid(mg):
|
||||
if mg.guild is None:
|
||||
return mg.author.id
|
||||
else:
|
||||
return mg.guild.id
|
||||
|
||||
# connect to the database
|
||||
con_data = sqlite3.connect("../database/data.db")
|
||||
curs_data = con_data.cursor()
|
||||
con_premium = sqlite3.connect("../database/premium.db")
|
||||
|
||||
Reference in New Issue
Block a user