mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 09:16:19 +00:00
🐛 fix(ChatProcess.py): remove unused imports and variables to improve code readability and maintainability
🐛 fix(ChatProcess.py): fix logic error in the return criteria for determining if the bot should respond to a message 🐛 fix(ChatProcess.py): fix typo in the 'functions' variable name 🐛 fix(ChatProcess.py): fix typo in the 'functions' parameter name in the request function call 🐛 fix(ChatProcess.py): fix typo in the 'functions' parameter name in the processFunctioncallResponse function call 🐛 fix(ChatProcess.py): remove unnecessary print statement in the processMessage function 🐛 fix(prompts.py): remove unnecessary print statement in the createPrompt function 🐛 fix(channelSetup.py): fix logic error in the is_owner function call 🐛 fix(moderation.py): remove unnecessary code for disabling moderation 🐛 fix(config.py): remove unnecessary code for creating tables in the database 🐛 fix(functionscalls.py): fix type hint for the return value of the call_function function 🐛 fix(guild.py): fix handling of serialized data in the load function 🐛 fix(SqlConnector.py): create setup_data table if it does not exist
This commit is contained in:
@@ -45,29 +45,9 @@ def mg_to_guid(mg):
|
||||
return mg.guild.id
|
||||
|
||||
|
||||
con_data = sqlite3.connect("./database/data.db")
|
||||
curs_data = con_data.cursor()
|
||||
con_premium = sqlite3.connect("./database/premium.db")
|
||||
curs_premium = con_premium.cursor()
|
||||
|
||||
curs_data.execute(
|
||||
"""CREATE TABLE IF NOT EXISTS data (guild_id text, channel_id text, api_key text, is_active boolean, max_tokens integer, temperature real, frequency_penalty real, presence_penalty real, uses_count_today integer, prompt_size integer, prompt_prefix text, tts boolean, pretend_to_be text, pretend_enabled boolean)"""
|
||||
)
|
||||
|
||||
con_data.execute(
|
||||
"CREATE TABLE IF NOT EXISTS setup_data (guild_id text, guild_settings text)"
|
||||
)
|
||||
|
||||
# This code creates the model table if it does not exist
|
||||
curs_data.execute(
|
||||
"""CREATE TABLE IF NOT EXISTS model (guild_id text, model_name text)"""
|
||||
)
|
||||
|
||||
# This code creates the images table if it does not exist
|
||||
curs_data.execute(
|
||||
"""CREATE TABLE IF NOT EXISTS images (guild_id text, usage_count integer, is_enabled boolean)"""
|
||||
)
|
||||
|
||||
# This code creates the data table if it does not exist
|
||||
curs_premium.execute(
|
||||
"""CREATE TABLE IF NOT EXISTS data (user_id text, guild_id text, premium boolean)"""
|
||||
|
||||
Reference in New Issue
Block a user