Comments (8)
I have previously run reaction-light without issues however one instance of the bot I had set up was experiencing issues with repeated "new version" messages despite being updated. I bit the bullet and decided to do a fresh setup with a fresh git clone etc. (this instance only requires a single role message so easy enough to get back up and running..in theory!) and now I am experiencing this issue.
An extra note: if i execute /bot version
I receive the expected You do not have an admin role
message in Discord, and using /admin list
outputs There are no bot admins registered in this server.
indicating that everything is set up enough
from reaction-light.
Looks like there's a problem with the db file.
What happens if you move the db file away (temporarily):
mv /home/jon/reaction-light-etf/files/reactionlight.db /home/jon/reactionlight.db
Do you still get an issue? If not, try using the backup (if applicable) reactionlight.db.bak
If it still does not work try running this python file while the db is in your home folder (/home/jon/reactionlight.db
):
import sqlite3
conn = sqlite3.connect("/home/jon/reactionlight.db")
c = conn.cursor()
c.execute("SELECT * FROM admins;")
print("### Admins ###")
c.fetchall()
print("### Tables ###")
c.execute("SELECT name FROM sqlite_master WHERE type='table';")
c.fetchall()
Post back the output you get.
from reaction-light.
Alright, so when I move the db file away while the bot is running and try running /bot version
I get an output of:
Database error when checking if the member is an admin:
```
no such table: admins
```
And running /admin add @Role
after gives the same traceback error as original in 1st post
Running that python script against the .db file now in my home directory gives:
$ python3 /home/jon/test.py
### Admins ###
### Tables ###
Checking the .db file in a SQLite browser shows the table exists though.
I've now tried deleting the database then starting the bot and immediately running /admin add @Role
which was successful (and confirmed in SQLite browser I see the admins table has a row with the role ID value expected). But running /bot version
after that yields the below
Ignoring exception in slash command 'version':
Traceback (most recent call last):
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 285, in invoke
await call_param_func(self.callback, inter, self.cog, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/params.py", line 778, in call_param_func
return await maybe_coroutine(safe_call, function, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/utils.py", line 561, in maybe_coroutine
return await value
File "/home/jon/reaction-light-etf/cogs/control.py", line 66, in print_version
await inter.response.defer()
File "/home/jon/.local/lib/python3.8/site-packages/disnake/interactions/base.py", line 666, in defer
await adapter.create_interaction_response(
File "/home/jon/.local/lib/python3.8/site-packages/disnake/webhook/async_.py", line 214, in request
raise NotFound(response, data)
disnake.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/interaction_bot_base.py", line 1332, in process_application_commands
await app_command.invoke(interaction)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 591, in invoke
await self.invoke_children(inter)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 576, in invoke_children
await subcmd.invoke(inter, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 294, in invoke
raise CommandInvokeError(exc) from exc
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 10062): Unknown interaction
After that, running /admin list
is OK, running /admin add @OtherRole
fails with the same errors shown in 1st post.
I tried running /message new
, asked for emoji and role which I provided, and the below image shows the output (which was repeated about 20 times over all at once, perhaps some loop in the code retrying over and over..?):
And this traceback error:
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 285, in invoke
await call_param_func(self.callback, inter, self.cog, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/params.py", line 778, in call_param_func
return await maybe_coroutine(safe_call, function, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/utils.py", line 561, in maybe_coroutine
return await value
File "/home/jon/reaction-light-etf/cogs/message.py", line 72, in new
await inter.send(response.get("new-reactionrole-init"))
File "/home/jon/.local/lib/python3.8/site-packages/disnake/interactions/base.py", line 580, in send
await sender(
File "/home/jon/.local/lib/python3.8/site-packages/disnake/interactions/base.py", line 837, in send_message
raise InteractionTimedOut(self._parent) from e
disnake.errors.InteractionTimedOut: Interaction took more than 3 seconds to be responded to. Please defer it using "interaction.response.defer" on the start of your command. Later you may send a response by editing the deferred message using "interaction.edit_original_message"
Note: This might also be caused by a misconfiguration in the components make sure you do not respond twice in case this is a component.
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/interaction_bot_base.py", line 1332, in process_application_commands
await app_command.invoke(interaction)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 591, in invoke
await self.invoke_children(inter)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 576, in invoke_children
await subcmd.invoke(inter, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 294, in invoke
raise CommandInvokeError(exc) from exc
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: InteractionTimedOut: Interaction took more than 3 seconds to be responded to. Please defer it using "interaction.response.defer" on the start of your command. Later you may send a response by editing the deferred message using "interaction.edit_original_message"
Note: This might also be caused by a misconfiguration in the components make sure you do not respond twice in case this is a component.
Restarting again, /bot version
does work OK. But trying a second time results in the same error as the above version traceback error.
Its as if its only possible to run one command through and any subsequent commands fail. (Unless its a /message new in which case the part after providing an emoji and role gives an error (or 20) regardless of being the first or twelfth command given after startup)
from reaction-light.
Okay, out of curiosity I've tried this on my local Ubuntu 20.04 laptop instead which has never had reaction-light installed (nevermind anything beyond basic python3 itself, I had to install pip!)
After setup.py etc.
/bot version
ran OK saying im not an admin
/admin add @Role
ran OK
but /bot version
a second time failed:
Traceback:
Ignoring exception in slash command 'version':
Traceback (most recent call last):
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 285, in invoke
await call_param_func(self.callback, inter, self.cog, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/params.py", line 778, in call_param_func
return await maybe_coroutine(safe_call, function, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/utils.py", line 561, in maybe_coroutine
return await value
File "/home/jon/reaction-light/cogs/control.py", line 66, in print_version
await inter.response.defer()
File "/home/jon/.local/lib/python3.8/site-packages/disnake/interactions/base.py", line 666, in defer
await adapter.create_interaction_response(
File "/home/jon/.local/lib/python3.8/site-packages/disnake/webhook/async_.py", line 214, in request
raise NotFound(response, data)
disnake.errors.NotFound: 404 Not Found (error code: 10062): Unknown interaction
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/interaction_bot_base.py", line 1332, in process_application_commands
await app_command.invoke(interaction)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 591, in invoke
await self.invoke_children(inter)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 576, in invoke_children
await subcmd.invoke(inter, **kwargs)
File "/home/jon/.local/lib/python3.8/site-packages/disnake/ext/commands/slash_core.py", line 294, in invoke
raise CommandInvokeError(exc) from exc
disnake.ext.commands.errors.CommandInvokeError: Command raised an exception: NotFound: 404 Not Found (error code: 10062): Unknown interaction
Restarting and running /bot version
works ok, but running a second time fails, just like before when running on my server.
from reaction-light.
I tried setting up a new instance of Reaction Light on Ubuntu 20.04 and disnake 2.4.0. I can't reproduce this error.
I set up reaction light 3.0.2 and 3.0.3, tried to update them, add admins, list admins, run the version command about 10 times without issues.
experiencing issues with repeated "new version" messages despite being updated
This was most likely caused by modified/new files that weren't in .gitignore
resulting in the update to fail. I should probably add a git reset --hard
to the update command.
I feel like I'm missing something.
SQLite should never fail to open the database file.
(which was repeated about 20 times over all at once, perhaps some loop in the code retrying over and over..?)
There are loops but the bot should always wait for user input before going for the next loop, which doesn't seem to be the case here.
I forgot to add the print statements if you are running it as a file:
import sqlite3
conn = sqlite3.connect("/home/jon/reactionlight.db")
c = conn.cursor()
c.execute("SELECT * FROM admins;")
print("### Admins ###")
print(c.fetchall())
print("### Tables ###")
c.execute("SELECT name FROM sqlite_master WHERE type='table';")
print(c.fetchall())
Do this while the bot is shutdown. (The new db is initialized when the bot starts if there is no db file).
from reaction-light.
On my server instance, I've re-setup again, started up bot without a .db file which was generated ok as expected, ran /bot version
ok, ran /admin add @Role
and got the original errors in discord and traceback.
Running your python script yields:
$ python3 test.py
### Admins ###
[]
### Tables ###
[('messages',), ('reactionroles',), ('admins',), ('cleanup_queue_guilds',), ('dbinfo',), ('guild_settings',)]
from reaction-light.
Can you join the bot's discord server (link in the readme) so I can help you further?
from reaction-light.
For future reference:
Issue was related to strange discord API problems - creating a new App ID and bot in discord developer portal solved issue.
from reaction-light.
Related Issues (20)
- Multiple (2) roles per reaction? HOT 4
- Support new lines with slash commands HOT 1
- error HOT 1
- Improve efficiency and UX of unique reactions checks HOT 1
- Problem with disnake - interaction_bot_base HOT 1
- Different language on different server
- Translations Tracker
- disnake 2.9.0 support
- Guild only commands missing error message HOT 2
- Bot DMs result in `The application did not respond` HOT 3
- Support Slash Commands for the new Discord API HOT 2
- Something went wrong :| HOT 1
- How to auto delete the first role, when select a rol HOT 2
- Refactor error reporting
- Refactor `message.py`
- Move functions from `bot.py` to `cogs.utils` HOT 6
- Add docker deployment
- Bot doesnt start anymore after update HOT 2
- Help! Slash Commands Not Registering HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reaction-light.