Cweating a Bot Account

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

Cweating a Bot account is a pwetty stwaightfowwawd pwocess.

  1. M-Make suwe you’we wogged o-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 cwick “Cweate”.

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

  6. M-M-Make suwe that Pubwic Bot is ticked if you want othews to invite youw b-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 y-y-you awe devewoping a sewvice that nyeeds it. If you’we unsuwe, then weave it unchecked.

  7. Copy the token by cwicking “Weset Token” and then using the “Copy” b-b-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

    It shouwd be wowth nyoting that this token i-i-is e-e-essentiawwy youw bot’s passwowd. Y-Y-You shouwd nyevew s-shawe this with s-s-someonye ewse. In doing so, someonye can wog in to youw bot a-a-and d-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 token, cwick the “Wegenyewate” button as soon as possibwe. This wevokes youw owd token and we-genyewates a nyew onye. Nyow you nyeed to use t-the nyew t-token to wogin.

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

Inviting Youw Bot

So you’ve made a B-Bot Usew but it’s nyot actuawwy in 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 the Discowd w-website.

  2. Nyavigate to the appwication page

  3. Cwick on youw bot’s page.

  4. Go to the “OAuth2” t-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

    I-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 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 U-UWW into y-youw bwowsew, choose a sewvew to invite t-t-the bot to, and cwick “Authowize”.

If you want to genyewate this UWW dynyamicawwy at wun-time inside youw bot and using t-t-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 want othew usews to invite youw bot to theiw sewvews. The easiest way to d-do this is to awwow usews to invite youw bot thwough i-i-its pwofiwe.

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

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

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

  2. Nyavigate to the appwication page

  3. Cwick o-o-on youw b-bot’s page.

  4. Go to the “OAuth2” tab.

  5. In authowization method, sewect In-app Authowization

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

    The scopes checkbox with "bot" ticked.

    Nyote

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

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

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

    • Bot ownyews must have 2FA enyabwed fow cewtain 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 pwofiwe.

    The Add to Server button.

Nyote

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