[2022-05-21 15:10:20][ERROR][bot]: Event 'on_message' caused an exception
Traceback (most recent call last):
File "/home/teeworlds/pybot/ddnet-discordbot/.venv/lib/python3.9/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "/home/teeworlds/pybot/ddnet-discordbot/cogs/moderator.py", line 198, in on_message
or is_staff(author) or author.bot or f'<@&{ROLE_MODERATOR}>' not in message.content:
File "/home/teeworlds/pybot/ddnet-discordbot/cogs/moderator.py", line 29, in is_staff
return any(r.id in (ROLE_ADMIN, ROLE_MODERATOR) for r in member.roles)
AttributeError: 'User' object has no attribute 'roles'
by adding author.bot to moderator.py, since webhook messages are just bot responses[2022-05-21 15:10:20][ERROR][bot]: Event 'on_message' caused an exception
Traceback (most recent call last):
File "/home/teeworlds/pybot/ddnet-discordbot/.venv/lib/python3.9/site-packages/discord/client.py", line 343, in _run_event
await coro(*args, **kwargs)
File "/home/teeworlds/pybot/ddnet-discordbot/cogs/moderator.py", line 198, in on_message
or is_staff(author) or author.bot or f'<@&{ROLE_MODERATOR}>' not in message.content:
File "/home/teeworlds/pybot/ddnet-discordbot/cogs/moderator.py", line 29, in is_staff
return any(r.id in (ROLE_ADMIN, ROLE_MODERATOR) for r in member.roles)
AttributeError: 'User' object has no attribute 'roles'
by adding author.bot to moderator.py, since webhook messages are just bot responses for<'f> fn(&'f ctx, &'f msg, &'f args) -> Pin<Box<dyn Future<Output=CommandResult> + Send + 'f>>
DDNet client by right-clicking the DDNet project (not the solution) and select "Select as StartUp project".
does it mean Set as Startup project not select as? or am i doing something wrong