Giter Site home page Giter Site logo

discord-ai-bot's Introduction

Discord AI Bot

Discord bot to interact with Ollama as a chatbot

Stars

Discord chat with the bot

Set-up instructions

  1. Install Node.js (if you have a package manager, use that instead to install this)
    • Make sure to install at least v14 of Node.js
  2. Install Ollama (ditto)
  3. Pull (download) a model, e.g ollama pull orca or ollama pull llama2
  4. Start Ollama by running ollama serve
  5. Create a Discord bot
    • Under Application » Bot
      • Enable Message Content Intent
      • Enable Server Members Intent (for replacing user mentions with the username)
  6. Invite the bot to a server
    1. Go to Application » OAuth2 » URL Generator
    2. Enable bot
    3. Enable Send Messages, Read Messages/View Channels, and Read Message History
    4. Under Generated URL, click Copy and paste the URL in your browser
  7. Rename .env.example to .env and edit the file
    • You can get the token from Application » Bot » Token, never share this with anyone
    • Make sure to change the model if you aren't using orca
    • Ollama URL can be kept the same unless you have changed the port
    • You can use multiple Ollama servers at the same time by separating the URLs with commas
    • Set the channels to the channel ID, comma separated
      1. In Discord, go to User Settings » Advanced, and enable Developer Mode
      2. Right click on a channel you want to use, and click Copy Channel ID
    • You can edit the system message the bot uses, or disable it entirely
  8. Start the bot with npm start
  9. You can interact with the bot by @mentioning it with your message

discord-ai-bot's People

Contributors

mekb-turtle avatar drhino avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.