Prerequisites
Before running Al, ensure you have the following:
Python 3.8+
Install it from python.org.
Ollama Server
Install from ollama.com.
Run an Ollama model locally:
bashollama run llama3
Ensure your Ollama server is running at
http://localhost:11434
(or updateOLLAMA_HOST
in the code if different).
Discord Bot Token
- Go to the Discord Developer Portal.
- Create or select an application, and go to the Bot tab.
- Click Add Bot.
- Enable Message Content Intent under Privileged Gateway Intents.
- Copy your bot token and keep it safe!
Bot Permissions
Use this permissions integer when inviting your bot: 85056
This allows:
- Read Messages/View Channels
- Send Messages
- Embed Links
- Attach Files
- Read Message History
- Use External Emojis
- Add Reactions
- Use Slash Commands
Generate an invite link like so:
https://discord.com/oauth2/authorize?client_id=YOUR_BOT_CLIENT_ID&permissions=85056&scope=bot
Replace
YOUR_BOT_CLIENT_ID
with your actual client ID.