Discord
This tutorial shows how to setup a Discord bot with Stammer.ai and Replit.
Last updated
This tutorial shows how to setup a Discord bot with Stammer.ai and Replit.
Last updated
4 Items are Needed for this tutorial:
Discord Bot Token
API Key from Stammer.ai
Chatbot UUID from Stammer.ai
(Optional) White Label URL from Stammer.ai
1. Set up Discord account and server: - Create a Discord account (if you don’t have one) - Create a new server or use an existing one
2. Create Discord application: - Go to https://discord.com/developers/applications - Click “New Application” - Name your application - Go to “Bot” tab and click “Add Bot”
3. Get bot token: - In “Bot” tab, find token section - Click “Copy” to copy bot token to paste into Replit - Keep this token secret!
4. Invite bot to server: - Go to “OAuth2" tab - In “Scopes” section, select “bot” - Choose desired permissions - Copy generated URL and open in new tab - Select server and authorize bot on the channels you want it to access
5. Create New Replit: - Create new Python file - Paste in the template code - Paste in the Discord bot code on line 68 - Update the Stammer Authorization key on line 10 - Update the chatbot UUID on line 11 - (Optional) Update the URL to be your white label API URL on line 14
6. Running the AI Agent: - Run the code in Replit - Go to your Discord channel and ask your bot a question by tagging its name
Code for Replit: