mirror of
https://github.com/Paillat-dev/Botator.git
synced 2026-01-02 09:16:19 +00:00
[GENERAL] Code reformatting using Black standard
This commit is contained in:
@@ -1,10 +1,12 @@
|
||||
import sqlite3
|
||||
conn = sqlite3.connect('../database/data.db')
|
||||
|
||||
conn = sqlite3.connect("../database/data.db")
|
||||
c = conn.cursor()
|
||||
import time
|
||||
#the database is: 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)''')
|
||||
#set the uses_count_today to 0 for all guilds every 24 hours
|
||||
|
||||
# the database is: 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)''')
|
||||
# set the uses_count_today to 0 for all guilds every 24 hours
|
||||
while True:
|
||||
c.execute("UPDATE data SET uses_count_today = 0")
|
||||
conn.commit()
|
||||
time.sleep(86400)
|
||||
time.sleep(86400)
|
||||
|
||||
Reference in New Issue
Block a user