Link to the project: https://github.com/RafiBG/AIChatDiscordBot
Made with C# on .NET 9.0 and libraries: DSharpPlus, DsharpPlus.Interactivity, DSharpPlus.SlashCommands, Newtonsoft.Json
Go to Discord developer portal link: https://discord.com/developers/applications. Make your own discord bot and get the token that will be used in config.json. Before you leave the website go to Bot and turn on the ones that you see on the image.
Now the Bot Permissions are shown in the image that you must check to work.
Install Ollama from this link: https://ollama.com/
From the official ollama website you can download AI model for your discord bot. https://ollama.com/search
Open your console and enter: ollama serve
It will show you the error and the last 5 numbers that you need to put in config.json to connect the AI.
Ollama must be running in the background to be able to connect to your local AI chat bot for discord.
Run the command in the console: ollama list
Copy the full name of the model you downloaded. We will need it for config.json
Example of what you will be looking for the name of the model in the console.
For first time running you must open AIChatDiscordBot.sln . You will need Visual Studio to open it. Download link for Visual Studio : https://visualstudio.microsoft.com/thank-you-downloading-visual-studio/?sku=Community&channel=Release&version=VS2022&source=VSLandingPage&passive=false&cid=2030
When you open it in Visual Studio, press AIChatDiscordBot up there. Here is an image of what you will be looking at. You can now close the console and Visual Studio.
In the folder Config there is config.json add your Discord token, the 5 numbers of your server, the exact name of the model that you downloaded, then copy the whole file config.json and go to AIChatDiscordBot\AIChatDiscordBot\bin\Debug\net9.0 and paste it there, also there is your AIChatDiscordBot.exe to start the program.
If you get in the console this error: "No connection could be made because the target machine actively refused it." Check if your "localhost" number is correct and token for config.json server or create one.
Slash commands
/ask (your message)
/forgetme - Start a fresh conversation with the AI only for you.
/reset - Resets all the user's chats and starts a whole new conversation for everyone.
/help - Show all the commands for the AI chat bot.
There are no datasets linked
There are no datasets linked