KitRifty / Gamgee

A Discord bot to play around with APIs and things.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Gamgee

"There's some good in this world, Mr. Frodo, and it's worth fighting for."

A Discord bot to play around with APIs and things

Prerequisites

This project requires NodeJS (version 12 or later), NPM, and a Discord bot account token. To make sure you have them available on your machine, try running the following command:

$ npm -v && node -v
6.14.11
v14.6.0

Clone the Repo

$ cd path/to/parent
$ git clone https://github.com/AverageHelper/Gamgee.git
$ cd Gamgee

Table of contents

Usage

Running the bot

You'll need a Discord bot account's token. See this awesome tutorial on how to get one.

With token in hand, create a file called .env in the root of your project folder. Save your token in that file, like so:

# .env

DISCORD_TOKEN=YOUR_TOKEN_HERE

Do not commit this file to git or your bot will get hacked.

Install the necessary dependencies:

$ npm install

And start the bot:

$ npm start

Running the tests

To run all tests with code coverage, run:

$ npm test

To run tests on files you've changed and automatically rerun tests as changes occur, run:

$ npm run test:watch

To run the style linter, run:

$ npm run lint

Commands

All commands must begin with the configured prefix (! by default).

ping

Gamgee responds with "Pong!"

yt

Given a YouTube video URL or video ID, Gamgee responds with that video's title and duration in minutes.

config

Access the persistent config.

config get <key>

Gamgee responds with the current configuration value for the provided key.

config set <key> <value>

Sets a new value for the provided key. Gamgee responds with a confirmation of the new key and value, with an option to undo.

Options

The following options are valid config keys:

  • command_prefix

Contributing

Please read CONTRIBUTING.md (soon) for details on our code of conduct and the process for submitting pull requests to us.

  1. Fork it!
  2. Create your feature branch: git checkout -b my-new-feature
  3. Add your changes: git add .
  4. Commit your changes: git commit -am 'Add some feature'
  5. Push to the branch: git push origin my-new-feature
  6. Submit a pull request 😎

Built With

Authors

License

GNU General Public License v3.0

About

A Discord bot to play around with APIs and things.

License:GNU General Public License v3.0


Languages

Language:TypeScript 100.0%