Files
Botator/code/config.py

17 lines
984 B
Python
Raw Normal View History

2022-12-08 22:21:53 +01:00
import logging
import sqlite3
2022-12-10 01:32:50 +01:00
max_uses: int = 400
2022-12-08 22:21:53 +01:00
logging.basicConfig(level=logging.INFO)
def debug(message):
logging.info(message)
conn = sqlite3.connect('../database/data.db')
c = conn.cursor()
2022-12-10 01:03:34 +01:00
connp = sqlite3.connect('../database/premium.db')
2022-12-10 01:27:14 +01:00
cp = connp.cursor()
2022-12-08 22:21:53 +01:00
2022-12-10 01:03:34 +01:00
c.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)''')
2023-01-30 22:58:29 +01:00
c.execute('''CREATE TABLE IF NOT EXISTS moderation (guild_id text, active boolean, rules text, disabled_channels text, disabled_roles text)''')
2022-12-15 18:59:21 +01:00
cp.execute('''CREATE TABLE IF NOT EXISTS data (user_id text, guild_id text, premium boolean)''')
2022-12-15 19:56:15 +01:00
cp.execute('''CREATE TABLE IF NOT EXISTS channels (guild_id text, channel0 text, channel1 text, channel2 text, channel3 text, channel4 text)''')