Discord - How to give my bot permissions. [Javascript]

32,699

Solution 1

You cannot assign permissions to a bot in the guild. They must be willingly given to the bot through the invite scopes of the person who invited it.

And yes, the permissions will give the bot a role in the server, so it can define if you can do something to a user with a higher role.

Im assuming you did these if you already have your bot on a server, but ill explain.

You go to the OAuth2 URL Generator, and put your client ID (I hope you already know how to get that.) You then select the bot scope(and any other scopes you would like...), then scroll down to the permissions section, and select the permission your bot needs. The user has the right to remove these permission, and then you can't really do anything, and hope they know the bot cant do the command then without it.

Then copy the link back up in the Appliction Info area, so you can paste it, and get your bot on a server!

That was alot, hope this helps at all.

Solution 2

  1. Go to oauth generate a URL for
    enter image description here

  2. Scroll to the bottom in Bot Permission select permissions needed by the bot, and kaboom its done :D
    enter image description here

  1. Copy the URL add the bot to your server :D
Share:
32,699
Sean
Author by

Sean

Young developer from Australia Enjoys JavaScript, Java, C++, and would like to know more about CyberSecurity/Networking Also give his chrome extension a little geez here !

Updated on May 14, 2021

Comments

  • Sean
    Sean about 3 years

    I started to experiment with things that required my bot to have certain permissions. I didn't know how to actually assign these permissions through JS. Does anyone have any ideas? (I also heard the permissions would also make a custom role for the bot)

    Thanks.

  • Steffo
    Steffo almost 3 years
    Discord now supports adding / removing permissions to integrations.