CodeRED-UH / CodeRED-DiscordBot

CodeRED's discord bot πŸ€–

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

CR-Astronaut-200

CodeRED Discord Bot πŸ€–

CodeRED is a 24 hours hackathon, organized by CougarCS, the largest computer science organization at the University of Houston. It's an event for people to come together and innovate by pushing their limits to create something amazing!

This is the official CodeRED Discord Bot. The bot is built using Typescript and DiscordJS.


CircleCI GitHub issues GitHub last commit GitHub package.json dependency version (prod)

Development πŸ”¨

  • Requirements

  • Installation

    1. yarn to install packages
    2. Create an .env in the root (./) directory
      • You must have a Discord Developer account setup to obtain a bot token.
      • Developer mode must be enabled in your Discord Client to obtain your Guild and Client IDs.
      • Contents of the .env file:
    TOKEN = <Discord_Bot_Token>
    GUILD_ID = <Guild_ID>
    CLIENT_ID = <Owner_ID>
    
    1. You're good to go!
  • Build Scripts

    • yarn start : Runs the code normally using ts-node.
    • yarn dev : Starts the ts-node-dev watcher and recompiles + runs code whenever a change is made.
    • yarn build : Compiles .TS files to .JS using TSC and puts them in ./dist
    • yarn clean : Compiles .TS files cleanly and wipes all existing .JS files
  • Linting/Styling

    • This repo uses ESLint and Prettier to enforce linting and styling rules.
    • yarn lint : Checks for any linting issues
    • yarn lint:fix : Attempts to fix any auto fixable linting issues
    • yarn prettier : Checks for any styling issues
    • yarn prettier:fix : Attempts to format all code to match style rules
    • We suggest using an ESLint and Prettier plugin for your respective editor to aid with development.
  • Structure

    • index.ts contains handler routing and login
    • ./commands contains individual commands
    • ./configs contains data storage/configuration
    • ./events contains handlers for different events
    • ./interfaces contains interfaces
    • ./utils contains utility files

Deployment πŸš€

  • To deploy you'll first need to run yarn build which builds the .JS files in ./dist
  • Secondly you'll need to navigate into ./dist and run node index.js

Contributing 🧩

  • Ideas

    • We want everyone to be able to help us in any way they can! Every idea is welcome, please open an issue describing what you have in mind first. We'll discuss your idea and we may add it to the bot! Feel free to also leave your thoughts on current ideas.
  • Bugs

    • Found a bug? Please let us know! Don't hesitate to write a bug report with as much information as possible!
    • Are you the exterminator type? Feel free to check out an existing bug report and see if you can find anything new and tell us what you've found.

About

CodeRED's discord bot πŸ€–


Languages

Language:TypeScript 99.7%Language:Shell 0.3%