#Bot cannot suppress embeds in one specific guild

1 messages · Page 1 of 1 (latest)

smoky jetty
#

Hi, I'm having a weird issue with a bot. It's listening for messages from users and when certain links are posted, it's supposed to kill the embed from the original post and then reply with its own.

For whatever reason, the bot can't seem to suppress embeds even when it's been invited with the correct permissions. I don't have this issue with two servers it's in, but a new server I'm added to is causing this problem. I realize this is a little non-specific but is it possible there's something I've overlooked when it comes to permissions?

#

My bot:

  • Has both privileged intents
  • Has the manage messages permission in the offending server
  • Has delcared its intents correctly during initialization
devout sail
#

intents shouldnt be needed here

#

is it only in this one server?

#

@smoky jetty :)

smoky jetty
#

Yeah. It works just fine in my two personal servers which is why I find it so weird

#

It's possible there's something weird about the way the roles are set up in this newest server?

devout sail
#

are you 100% sure that you have the manage messages permission in that server?

smoky jetty
#

I can ask them to check. It's possible the bot doesn't have it, but the owner said when he invited the bot he didn't uncheck any of the boxes

#

And the invite link I gave him did include Manage Messages

#

I'll ask tho

devout sail
#

thats the only reason i can see with not being able to do the action

smoky jetty
#

Is it possible that a higher-tiered role on the bot could be blocking the requested permission?

devout sail
#

otherwise, it should work

devout sail
smoky jetty
#

Ok thanks

#

I'll ask the server owner to look at the bot permissions, it's possible it doesn't have the right perms

devout sail
#

:)

smoky jetty
#

Alright I did ask and the bot has the manage messages permission. The server owner even overrode an entire text channel category just for the bot's role and gave it more than it needed

#

And any time it tries to suppress embeds in those channels it throws a permissions error

#
E 2024-06-11 21:15:29,411 hikari.event_manager: an exception occurred handling an event (GuildMessageCreateEvent)
  + Exception Group Traceback (most recent call last):
  |   File "/home/tempystral/git/hikari-boxbot/bot/modules/sauce.py", line 50, in sauce
  |     async with TaskGroup() as tg:
  |   File "/usr/lib/python3.12/asyncio/taskgroups.py", line 145, in __aexit__
  |     raise me from None
  | ExceptionGroup: unhandled errors in a TaskGroup (1 sub-exception)
  +-+---------------- 1 ----------------
    | Traceback (most recent call last):
    |   File "/home/tempystral/git/hikari-boxbot/env/lib/python3.12/site-packages/hikari/messages.py", line 883, in edit
    |     return await self.app.rest.edit_message(
    |            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/tempystral/git/hikari-boxbot/env/lib/python3.12/site-packages/hikari/impl/rest.py", line 1615, in edit_message
    |     response = await self._request(route, json=body)
    |                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |   File "/home/tempystral/git/hikari-boxbot/env/lib/python3.12/site-packages/hikari/impl/rest.py", line 732, in _request
    |     await aio.first_completed(request_task, self._close_event.wait())
    |   File "/home/tempystral/git/hikari-boxbot/env/lib/python3.12/site-packages/hikari/internal/aio.py", line 135, in first_completed
    |     await next(iterator)
    |   File "/usr/lib/python3.12/asyncio/tasks.py", line 631, in _wait_for_one
    |     return f.result()  # May raise f.exception().
    |            ^^^^^^^^^^
    |   File "/home/tempystral/git/hikari-boxbot/env/lib/python3.12/site-packages/hikari/impl/rest.py", line 905, in _perform_request
    |     raise await net.generate_error_response(response)
    | hikari.errors.ForbiddenError: Forbidden 403: (50013) 'Missing Permissions' for https://discord.com/api/v10/channels/597171614815092777/messages/1250196731086241953
    +------------------------------------
devout sail
#

i can quite confident say that its very possible they did not setup permissions correctly

smoky jetty
#

Hrm. The bot does have the right perms so would this be something they need to adjust at the channel level?

#

Discord's permission system tends to break in opaque ways I find. It would be nice to know WHY it doesn't have permission

devout sail
#

try giving it admin and seeing if that works

#

just for the sake of trying

smoky jetty
#

Lol I'll give it a shot when the server owner is around again, thanks

devout sail
#

:)

smoky jetty
#

This is also in a patreon-enabled server so I wonder if this is partly due to linked roles?

#

But idk if they even use those because they have their own wack-ass bot that manages roles

devout sail
#

that should not be an issue

smoky jetty
#

Hmm, alright

smoky jetty
#

I relayed this to the server owner and this was the outcome:

#

Looks like we have a resolution. Thanks for helping me troubleshoot this, I appreciate the sanity check

devout sail
#

np :)