-
Notifications
You must be signed in to change notification settings - Fork 617
Discord bot setup
(based upon https://github.com/reactiflux/discord-irc/wiki/Creating-a-discord-bot-&-getting-a-token)
First, you need to go here and click "New Application"
Now give your bot a name.
Click "Create". On the next screen, you can set an Avatar Icon for your app and description (not necessary). This is also where you will find your Client ID, more on that later.
Next, click on Bot on the left-hand menu, then click "Add Bot"
Click "Yes Do It"
On the Bot screen you will get to see your token, you can click "Copy" to put it in your clipboard or "Click to reveal your Token", put this in your config file. Here, you can toggle if the bot is public (which will allow others to invite to their servers, this is on by default).
Make sure to also toggle the "Server Members Intent" and "Message Content Intent" options further down under "Privileged Gateway Intents" to allow the bot to see the member list, otherwise you'll get an error message similar to Error obtaining server members: HTTP 403 Forbidden, {"message": "Missing Access", "code": 50001}
.
Click "Save Changes"
Now it's time to invite your bot to your server. Don't worry about your bot being started for this next step. You can get this under OAuth2 → General
Change the client_id to your Client ID under App Details, then go to this URL
https://discordapp.com/oauth2/authorize?&client_id=YOUR_CLIENT_ID_HERE&scope=bot&permissions=536870912
The weird number (536870912 = 0x20000000) corresponds to the "Manage Webhooks" permission. If you don't want to use AutoWebhooks=true
, then you can use 0
instead.
Now select your server, then click authorize.
Solve CAPTCHA if necessary
Then you should see
You can confirm the bot is added under Your Guild > Settings > Integrations > Bots and Apps, and in your #general channel you should see "A wild [bot name] appeared!".
Take the bot's token (the token, not the client ID) and add it to your matterbridge config like so:
[discord.yourbridgename]
Token="NzY1OTgwMjA2Nzc4Mjg2MTIx.X4csqA.HO0F0tg7rvnVrv70kMhQcdXikjY"
# Server (REQUIRED) is the ID or name of the guild to connect to, selected from the guilds the bot has been invited to
Server="70489999999999999999"
That's it! Now you can start your bot and enjoy chatting!
Getting started
How to create your config
Discord bot setup
Slack bot setup
MS Teams setup
Deploy
DigitalOcean
Azure
Docker
Heroku
Gateways
Config: basic
Config: channel rules
Discord
Gitter
Hipchat
IRC
Keybase
Matrix
Mattermost
Microsoft Teams
Mumble
Nextcloud Talk
RocketChat
Slack
Sshchat
Steam
Telegram
Twitch
VK
WhatsApp
XMPP
Zulip
Advanced
Mediaserver setup
Service files
Developer
API
Tengo scripting
Making gateways