Giter Club home page Giter Club logo

out_of_context's Introduction

Out-of-context

A discord bot to store and call quotes from a guild.

What does it do?

It can react to things happening on the guild, and has specific commands.

Reactions

Guild member sent exaclty the message "99!":
  Responds with a random quote from Brooklyn 99
An error happened in response to a command:
  Responds with the error message

Commands

Quotes:
  !feed                                         Store the message to later use it for the serve command: '!feed quote' or '!feed' as a reply to the quote
  !menu                                         Gets all stored custom quotes
  !serve quote_number                           Responds with the custom quote corresponding to the number
  !priory                                       Responds with a random quote from the Priory of the Orange Tree
  !random                                       Responds with a random quote from the custom quotes
Utils:
  !roll number_of_dice number_of_sides          Simulates rolling dice
​No Category:
  !help                                         Shows this message

Type !help command for more info on a command.
You can also type !help category for more info on a category.

To launch it

This bot must have access to message content.

Inside this directory, create a .env file containing:

DISCORD_TOKEN=your-bot-token
DISCORD_GUILD=your-guild-name

For more info on how to get those variables: how to make a discord bot in the developer portal.

To install dependencies:

pip install -r requirements.txt

To run the code:

python bot.py

When successfully launched, it should return:

out-of-context has connected to Discord!
guild_name(id: guild_id)

Storing quotes

You can either use a text file or a Google Doc.

Text file

Create a out_of_context.txt file (it can be empty). The main drawback is that if the bot is launched on multiple server, the text file must be transfered each time.

Google Doc

Add a credentials.json from Google For Developers (ID client OAuth 2.0).

Must also add GOOGLE_DOCUMENT_ID=your-document-id to the .env file.

More details for the setup on Google Docs - Python: quickstart.

Need to add

  • Host the discord bot

Sources

out_of_context's People

Contributors

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