Giter Site home page Giter Site logo

discord-bot's Introduction

Discord Bot

Usage

To be able to use this bot you need to do the following:

  1. Create a new application in the Discord Developer Portal.

  2. Create a bot for the application created previously. When doing so you need to make a note of the Token as this will be needed later.

  3. Use OAuth2 in the application with the bot scope. Copy the URL and paste it into your web browser. This will ask you to log the bot into a specific server. If the server isn't in the list then you will need to be granted permissions.

  4. Create a .env file based on .env.example.

    cp .env.example .env
  5. In the .env file you should set a value of BOT_TOKEN to the Token which you received when you created the bot in the Discord Developer Portal.

  6. Run the bot, this can be done in one of 2 ways:

Run With Docker (Recommended)

This assumes that you have Docker already installed on your machine.

Build and run the Docker container in detached mode.

docker build -t discord-bot .
docker run -it --rm -d --name discord-bot discord-bot

If you want to stop the Docker container.

docker stop discord-bot

Run Natively

You can run the bot natively. This requires you to have Python 3 and Pip installed on your machine:

sudo apt install python3 python3-pip

Install the Python dependencies.

pip install -r requirements.txt

Then execute the Python script.

python3 bot.py

discord-bot's People

Contributors

alexwinder avatar

Watchers

 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.