Bug: `role add` doesn't sometimes
cmd: .role add "degradation" <@224920393067003904>
error:
Traceback (most recent call last):
File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 382, in _run_event
await coro(*args, **kwargs)
File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 384, in on_message
await self.process_commands(message)
File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 381, in process_commands
await self.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/bot.py", line 344, in invoke
await ctx.command.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1505, in invoke
await ctx.invoked_subcommand.invoke(ctx)
File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 919, in invoke
await self.prepare(ctx)
File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 836, in prepare
if not await self.can_run(ctx):
File "/usr/local/lib/python3.10/site-packages/discord/ext/commands/core.py", line 1160, in can_run
return await discord.utils.async_all(predicate(ctx) for predicate in predicates) # type: ignore
File "/usr/local/lib/python3.10/site-packages/discord/utils.py", line 564, in async_all
elem = await elem
File "/usr/src/cables/cabling_bot/bot/checks.py", line 64, in predicate
if proposed_role > ctx.guild.me.top_role:
TypeError: '>' not supported between instances of 'NoneType' and 'Role'
Caused by #64 (closed)
Edited by erin