Giter Site home page Giter Site logo

discord-bot's Introduction

Discord-Bot

This is a Discord bot written in Python using discord.py that features various commands listed here. The commands are written as cogs found in the modules folder and can be easily implemented into an existing bot.

Dependencies

Installation

Download or clone the respository

git clone https://github.com/gkvong/Discord-Bot

To install any required dependencies:

pip install -r requirements.txt

Setup

Inviting the bot to your server

  1. Create an account for the Discord developer portal.
  2. Create a new application.
  3. Navigate to Bot on the left sidebar and add a bot.
  4. Navigate to the OAuth2 tab on the left sidebar and select the bot box in the SCOPES section.
  5. In the BOT PERMISSIONS section select the permissions you want the bot to have. Recommended minimum permissions are all the boxes under TEXT PERMISSIONS and View Channels.

Obtaining your Discord token

  1. In the Discord developer portal navigate to Bot.
  2. Copy the token and replace [PASTE YOUR DISCORD BOT TOKEN HERE] in .env with the token.

Obtaining your OpenWeatherMap API ID

  1. Create an account and sign in at openweathermap.org.
  2. On the top navigation bar, click on your username and go to My API keys.
  3. Copy the key and replace [PASTE YOUR OPENWEATHERMAP API ID HERE] in .env with the token.

Running the bot

To run the bot, execute main.py:

python main.py

Bot Commands

Command Description
$help Provides a brief description of the bot commands.
$ping Get the latency of the bot.
$minesweeper Play a game of minesweeper.
$trivia Start a game of trivia.
$define <query> Search for a definition from Google Dictionary.
$wiki <query> Get the first few sentences of a Wikipedia page.
$translate <to> <from> <text> Translate a message.
$weather <city> Get the current weather in a city.
$forecast Get the 7-day Sydney weather forecast.

License

MIT License

Acknowledgements

Thanks to DeCoded-Void for Minesweeper_discord.py where a large portion of the code in the minesweeper module was taken from.

discord-bot's People

Contributors

gkvong 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.