Open Qoyyuum opened 7 months ago
@axololly
Probably just needs to be created. Run the "messages" table creation statement in the "Dependencies" section and you should be good to go.
I've edited the code so that it creates those tables on start up but now I'm hitting with various bugs like
timezonebot | Traceback (most recent call last):
timezonebot | File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 441, in _run_event
timezonebot | await coro(*args, **kwargs)
timezonebot | File "/app/timezones.py", line 153, in check_messages_per_minute
timezonebot | await conn.execute("""INSERT INTO messages (guild_id, channel_id) VALUES (?, ?)
timezonebot | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
timezonebot | TypeError: 'str' object is not callable
I fixed it with a comma on line 153 and then another bug
timezonebot | Traceback (most recent call last):
timezonebot | File "/usr/local/lib/python3.12/site-packages/discord/client.py", line 441, in _run_event
timezonebot | await coro(*args, **kwargs)
timezonebot | File "/app/timezones.py", line 153, in check_messages_per_minute
timezonebot | await conn.execute("""INSERT INTO messages (guild_id, channel_id) VALUES (?, ?)
timezonebot | File "/usr/local/lib/python3.12/site-packages/asqlite/__init__.py", line 138, in _runner
timezonebot | ret = await future
timezonebot | ^^^^^^^^^^^^
timezonebot | File "/usr/local/lib/python3.12/site-packages/asqlite/__init__.py", line 89, in _call_entry
timezonebot | result = entry.func(*entry.args, **entry.kwargs)
timezonebot | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
timezonebot | sqlite3.OperationalError: near "SET": syntax error
I propose switching this to Supabase. Thoughts @axololly ?
Can't delete from messages if the database doesn't exist.