Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error without Administrator premissions #244

Closed
xdmichal opened this issue Jul 18, 2024 · 3 comments
Closed

Error without Administrator premissions #244

xdmichal opened this issue Jul 18, 2024 · 3 comments

Comments

@xdmichal
Copy link

If I check: Manage Webhooks, Read Messages/View Channel, Send Messages in OAuth2 ( https://discord.com/developers/applications )
I have this error

2024-07-18 15:31:48 ERROR [dibridge.discord] on_error(on_ready): () / {}
Traceback (most recent call last):
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\client.py", line 449, in _run_event
await coro(*args, **kwargs)
File "C:\Users\Admin\Desktop\dibridge-1.4.1\dibridge\discord.py", line 54, in on_ready
for webhook in await self._channel.webhooks():
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\channel.py", line 564, in webhooks
data = await self._state.http.channel_webhooks(self.id)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Admin\AppData\Local\Programs\Python\Python312\Lib\site-packages\discord\http.py", line 752, in request
raise Forbidden(response, data)
discord.errors.Forbidden: 403 Forbidden (error code: 50013): Missing Permissions

If I check Administrator there is no error
permissions
intents

@xdmichal
Copy link
Author

I didn't add permissions directly in discord app to the channel and role of the bot

@TrueBrain
Copy link
Member

The first screenshot you show is I guess the Bot Permissions page of the Discord Developer Portal? Those checks don't do anything, it just calculates a number for you. You can ignore that safely. You do need to set the Intents on the Discord Developer Portal, like you already did.

However, you do need to give the permissions Send Messages, Read Messages and Manage Webhooks on the Discord server to the bot. This is not in the Discord Developer Portal, but in Discord, on the actual server you added the bot to. Once you assigned the bot these permissions, it will function as expected.

Edit: ah, you already figured that out :)

@TrueBrain
Copy link
Member

Created #245, as the wording in the README weren't all that clear what to do where. Hopefully that helps the next person :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants