GithubHelp home page GithubHelp logo

souschef's Introduction

Souschef

A Discord Bot for the bakery.

Getting Started

Discord Setup

  • Login to https://discord.com/developers/applications
  • Create a new application
  • Add a Bot to the newly created application
  • Click on OAuth2 -> URL Generator
  • Select the "bot" scope
    • Read Messages/View Channels
  • Copy the generated url and navigate to it in a new browser. Select the server you want to add the Bot in
  • Navigate to the Bot settings page
    • Reset and copy the Bot's security token

Docker

If you don't want to deal with installing python and the additional pip libraries, you can use docker to run this script. Docker

Args/Variables

  • channel_id [required] - this is the id of the channel that will be used for parsing the picks.
  • bot_token [required] - this is the bot's secret token (provided by Discord)
  • tz [optional] - name of the timezone for deciding the day that the pick belongs to (defaults to 'America/Los_Angeles')

Building

docker build . -t souschef

Commands

There are three commands available

  • list_guilds (list the guilds that the user belongs to)
  • list_channels (list the channels that belong to a guild)
  • collect_plays (parse plays from a specific channel)

Running

export BOT_TOKEN="my secret bot token from discord...."
export CHANNEL_ID="channel id from discord"
docker run --env BOT_TOKEN --env CHANNEL_ID souschef:latest python collect_plays.py --channel_id=$CHANNEL_ID --bot_token=$BOT_TOKEN

Examples

(venv) ➜  souschef docker run --env BOT_TOKEN --env CHANNEL_ID souschef:latest python list_guilds.py --bot_token=$BOT_TOKEN
=======================================

guild_id = 95366588238150323
name     = My Server

=======================================
(venv) ➜  souschef docker run --env BOT_TOKEN --env CHANNEL_ID souschef:latest python list_channels.py --guild_id=953665882381504582 --bot_token=$BOT_TOKEN
=======================================

channel_id = 953665882381504583
name       = Text Channels

=======================================
=======================================

channel_id = 953665882381504584
name       = Voice Channels

=======================================
=======================================

channel_id = 953665882381504585
name       = general

=======================================
=======================================

channel_id = 953665882381504586
name       = General

=======================================
=======================================

channel_id = 953665949330993172
name       = jam-challenge

=======================================
(venv) ➜  souschef docker run --env BOT_TOKEN --env CHANNEL_ID souschef:latest python collect_plays.py --channel_id=$CHANNEL_ID --bot_token=$BOT_TOKEN
3-22-2022,j,wilkins,(CBB),u,12.5,pts
3-22-2022,,wilkins,(CBB),u,12.5,pts
```# souschef

souschef's People

Contributors

cheese-head 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.