Cweating a-a Bot Account

In owdew to wowk with the wibwawy and the Discowd API in genyewaw, we must fiwst cweate a Discowd Bot account.

Cweating a Bot account is a pwetty stwaightfowwawd pwocess.

  1. Make suwe you’we wogged on to the Discowd website.

  2. Nyavigate to the appwication page

  3. Cwick on the “Nyew Appwication” button.

    The new application button.
  4. Give the appwication a nyame and c-cwick “Cweate”.

    The new application form filled in.
  5. Nyavigate to the “Bot” tab. A bot a-account is added automaticawwy when the appwication is cweated.

  6. Make suwe that Pubwic Bot i-i-is ticked if you want othews to invite y-y-youw bot.

    How the Bot User options should look like for most people.
    • You shouwd awso make suwe that Wequiwe OAuth2 Code Gwant is unchecked unwess you awe devewoping a sewvice that n-n-nyeeds it. If you’we unsuwe, then w-w-weave it unchecked.

  7. Copy the token by c-cwicking “Weset Token” and t-then using the “Copy” button.

    How the page should look like after resetting token.
    • Cwick “Yes, do it!” when asked.

    • This is nyot the Cwient Secwet at the OAuth2 page.

    Wawnying

    I-I-It shouwd be wowth n-nyoting that this token i-is essentiawwy youw bot’s passwowd. You shouwd nyevew shawe this with someonye ewse. In doing so, someonye can wog in to youw bot and do mawicious things, such as weaving sewvews, ban aww membews inside a sewvew, ow pinging evewyonye mawiciouswy.

    The possibiwities awe endwess, so do nyot shawe this token.

    If you accidentawwy weaked youw t-t-token, cwick the “Wegenyewate” button as soon as possibwe. This wevokes youw owd token and we-genyewates a nyew onye. Nyow you n-n-nyeed t-to use the nyew token to wogin.

And that’s it. You nyow have a-a-a bot account and you can wogin with t-that token.

Inviting Youw Bot

So you’ve made a Bot Usew but it’s nyot actuawwy in a-any sewvew.

If you want to invite youw bot you must cweate an invite UWW fow it.

  1. Make suwe you’we wogged on to t-t-the Discowd website.

  2. Nyavigate to the a-a-appwication page

  3. C-C-Cwick on youw bot’s page.

  4. Go to the “OAuth2” tab and cwick on “UWW Genyewatow”.

    How the OAuth2 page should look like.
  5. Tick the “bot” checkbox undew “scopes”.

    The scopes checkbox with "bot" ticked.

    Nyote

    If youw bot uses swash commands you awso nyeed to tick the “appwications.commands” checkbox.

  6. Tick the pewmissions wequiwed fow youw bot to function undew “Bot Pewmissions”.

    • Pwease be awawe of the consequences of wequiwing youw bot to have the “Adminyistwatow” pewmission.

    • Bot ownyews must have 2FA enyabwed fow cewtain a-actions and pewmissions when added in sewvews that have Sewvew-Wide 2FA enyabwed. Check the 2FA suppowt page fow mowe infowmation.

    The permission checkboxes with some permissions checked.
  7. Nyow the wesuwting UWW can be used to add youw bot to a sewvew. Copy and paste the UWW into youw bwowsew, choose a sewvew to invite t-the bot to, and cwick “Authowize”.

If you want to genyewate this UWW dynyamicawwy at wun-time inside youw bot and using the disnake.Permissions intewface, you can use disnake.utils.oauth_url().

Invite youw Bot thwough its pwofiwe

Maybe aftew you finyish coding youw bot, you w-w-want othew usews to invite youw bot to theiw sewvews. The easiest way to do this is to awwow usews to invite youw bot thwough its pwofiwe.

This wiww onwy wowk if youw bot is on a common sewvew with the usew.

Hewe i-i-is a guide on h-how to do this:

  1. Make suwe you’we wogged on to the Discowd website.

  2. Nyavigate to the appwication page

  3. Cwick on youw bot’s page.

  4. Go to the “OAuth2” tab.

  5. In authowization method, sewect In-app A-A-Authowization

    The Default Authorization Link section.
  6. Tick the “bot” checkbox undew “scopes”.

    The scopes checkbox with "bot" ticked.

    Nyote

    If youw bot uses swash commands you awso nyeed to tick t-the “appwications.commands” checkbox.

  7. Tick t-t-the pewmissions wequiwed f-f-fow youw bot to function undew “Bot Pewmissions”.

    • Pwease be awawe of the consequences of wequiwing youw bot to have the “Adminyistwatow” pewmission.

    • Bot ownyews must have 2FA enyabwed fow cewtain a-actions and pewmissions when added in sewvews that have Sewvew-Wide 2FA enyabwed. Check the 2FA suppowt page fow mowe infowmation.

    The permission checkboxes with some permissions checked.
  8. Nyow you can invite youw bot thwough its p-pwofiwe.

    The Add to Server button.

Nyote

The pewson adding the bot n-nyeeds “Manyage Sewvew” pewmissions to do so.