embedchain/docs/examples/discord_bot.mdx
OPENAI_API_KEY in your variables.env file.New Application.Create. On the resulting page, enter the details of your bot as you like.Bot. Under the heading Privileged Gateway Intents, toggle all 3 options to ON position. Save your changes.Reset Token and copy the token value. Set it as DISCORD_BOT_TOKEN in .env file.OAuth2 and go to General.Authorization Method to In-app Authorization. Under Scopes select bot.Bot Permissions allow the following and then click on Save Changes.Send Messages (under Text Permissions)
OAuth2 and go to URL Generator. Under Scopes select bot.Bot Permissions set the same permissions as above.Generated URL. Paste it in a browser window and select the Server where you want to add the bot.Continue and authorize the bot. python -m embedchain.bots.discord
# or if you prefer to see the question and not only the answer, run it with
python -m embedchain.bots.discord --include-question
```
</Tab>
/ec add <data_type> <url_or_text>
/ec query <question>
/ec chat <question>
š Note: To use the bot privately, you can message the bot directly by right clicking the bot and selecting Message.
š Happy Chatting! š