FM-17 / poglink

A bot that integrates the ARK Web API with Discord.
MIT License
12 stars 5 forks source link

Missing roles #16

Closed travipross closed 2 years ago

travipross commented 2 years ago

When I go to the test channel and type .test my terminal running the bot displays:

2021-12-11 23:06:44,850:INFO:ark_discord_bot.cogs.bans: Ban summary not updated.
Ignoring exception in command test:
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/bot.py", line 939, in invoke
    await ctx.command.invoke(ctx)
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 855, in invoke
    await self.prepare(ctx)
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 777, in prepare
    if not await self.can_run(ctx):
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 1087, in can_run
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
  File "/usr/local/lib/python3.7/site-packages/discord/utils.py", line 348, in async_all
    for elem in gen:
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 1087, in <genexpr>
    return await discord.utils.async_all(predicate(ctx) for predicate in predicates)
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 1689, in predicate
    raise MissingAnyRole(items)
discord.ext.commands.errors.MissingAnyRole: You are missing at least one of the required roles: 'Administrator', 'Tech Administrator', or 'dot'
FM-17 commented 2 years ago

I provided roles to your original account upon joining, but not your new one. All fixed though. image

FM-17 commented 2 years ago

As a side note: The fact that it provides no error logging within Discord is intended - users will often attempt to spam channels by triggering bot responses.

Once I add an in-discord setup interface, I'll include an "allowed channels" option so the bot can only be triggered in designated channels, but until then it can remain silent.