Git Product home page Git Product logo

discordbot-chef-wildcat's Introduction

DiscordBot: Chef-Wildcat

Bot Setup

/ChefWildcat-bot NodeJS Dependencies To Install with NPM

Can be installed with npm install <package>

  • Discord.js
  • @discordjs/rest
  • pg
  • sequelize
  • axios
  • cheerio
  • node-schedule

config.json Format

Create a config.json file with the following format.

{
    "token": "bot token here",
    "clientId": "oath2 client id here",
    "guildId": "testing server guild id here",
    "adminRole": "role name here, for running certain commands",
    "logChannelId": "channel id for the logging channel, bot must already be in the server"
}

Slash commands

These slash commands can be uploaded to a testing server using the deploy-commands.js script, given that the server guildId is saved in the config file and that the bot has been invited to the server with the slash command permission. Run using node deploy-commands.js <flag> with up to one flag at a time. The commands uploaded to a test server will all have "dev" added to the end of their descriptions, to distinguish between previously uploaded global commands.

Flags
  • None: Default, uploads commands to a guild for testing
  • -g: Uploads commands globally (may take an hour to reflect on Discord)
  • -ct: Clears testing commands from the test guild (does not remove global commands)
  • -cg: Clears global commands (may take an hour)

Docker

This application is containerized, so Docker must be started before running docker-compose up -d. The application runs in a NodeJS container named chefwildcat, and the Postgres database is in a container named pgdb. For testing, the docker-compose up --build can be used to follow the outputs of the containers. Additionally, docker-compose up -d --no-deps --build <service> can be used to rebuild and restart a single service rather than building and restarting all of the containers in the docker-compose file.

Commands

The following commands are implemented in this bot:

/ping

A simple ping-pong command for testing if the bot is running.

/philly

Displays the given menus for the day for Philbrook dining hall.

/hoco

Displays the given menus for the day for Holloway Commons dining hall.

/stillings

Displays the given menus for the day for Stillings dining hall.

/breakfast

Displays the given menus for the day for breakfast.

/lunch

Displays the given menus for the day for lunch.

/dinner

Displays the given menus for the day for dinner.

/favorite

Marks a menu item as a favorite. Only available in DMs.

/unfavorite

Unmarks a menu item as a favorite. Only available in DMs.

/favorites

Displays the favorited items list. Only available in DMs.

/test

A command for testing

/halltoggle

Toggles the daily subscription for a given hall in a given channel or direct message.

/refresh

Refreshes the subscribed menus for the subscriptions in the given channel or direct message.

discordbot-chef-wildcat's People

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.