Error on !raid command and !team (valor/mystic etc ) command
Pogodenhelder opened this issue · 8 comments
When i do a command like !raid or !valor i get the following error in console.
The command is deleted by delibot, but nothing happens ( i think it needs to PM the person that does the command but thats not happening )
Ignoring exception in command raid:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "/home/job-bais/DeliBot/delibot/cogs/raid.py", line 56, in raid
"RAID_CREATION TYPE_BELOW WHAT_POKEMON WHAT_TIME WHAT_LOCATION THANK_YOU RAID_TIME RAID_LOCATION RAID_TOTAL RAID_BY")
File "/home/job-bais/DeliBot/delibot/cogs/utils.py", line 88, in get_translation
(language_code, ) = await self.bot.db.execute(query, params, single=True)
TypeError: 'NoneType' object is not iterable
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/bot.py", line 939, in invoke
await ctx.command.invoke(ctx)
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 863, in invoke
await injected(*ctx.args, **ctx.kwargs)
File "/usr/local/lib/python3.6/dist-packages/discord/ext/commands/core.py", line 94, in wrapped
raise CommandInvokeError(exc) from exc
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: TypeError: 'NoneType' object is not iterable
When i have set a channel for ocr scan for my profile i get also an error
Ignoring exception in on_message
Traceback (most recent call last):
File "/usr/local/lib/python3.6/dist-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "/home/job-bais/DeliBot/delibot/cogs/ocr.py", line 82, in on_message
profile_channel_id, exraid_channel_id = await self.bot.db.execute(query, params, single=True)
TypeError: 'NoneType' object is not iterable
Can you check if there's any entry for your server in the database?
SELECT * FROM settings WHERE server_id = xxxxxxxxxxxxxxxxxx;
(User settings -> Advanced -> Developer Mode -> Right-click your server icon -> Copy ID)
Everything is empty in that table.
Same here, after i configured the channels I have no entries in the database.
Hmm, a wild guess would be that you invited the bot to the server before it was online?
While the bot is online, try kicking it from the server and then re-invite it 😄 After that, check if there's a new entry for your server
ah that might be it, i have now an entry in the database..
Well lets see how it works, i had the very very very very old version due being contributor but well never used it much :p
Because of https://github.com/Widdin/DeliBot/blob/master/delibot/cogs/utils.py#L24 then. Maybe I should add a function to check if the amount in settings
is the same as the bot is in when it boots up to avoid this issue 😄
well it works now, i have posted in the feature request a spinoff of delibird.
Remember in the beginning where contributors got the sourcecode of the first delibird, this is a spinoff but mostly rewritten i think.
It might be worth to take a look on how to make the gymtable have a more functional way, since i think in my case it does not work, or at least i havent found out for what its being used.
I added a few gyms but thats it :p