discord-bot

Version, currently master branch1 version
  • master branchlatestApr 21, 2020

github.com/denolfe/discord-crystal

General-use Discord bot written in Crystal

9 stars
0 dependents
License: MIT

Installation

# Add this to your shard.yml
dependencies:
  discord-bot:
    github: denolfe/discord-crystal
    branch: master

master is a branch, not a release, so this tracks it rather than pinning a version.

Then run:

shards install

shard.yml

Crystal
0.29.0
License
MIT
Author
Elliot DeNolf <denolfe@gmail.com>
Target
  • bot from src/bot.cr

Dependencies

Runtime Dependencies

  • dotenv*github: gdotdesign/cr-dotenv
  • discordcr*github: z64/discordcr, branch: master

README

# Discord Crystal

[![Actions Status](https://github.com/denolfe/discord-crystal/workflows/Crystal%20CI/badge.svg)](https://github.com/denolfe/discord-crystal/actions)

> General-use Discord bot written in Crystal

## Installation

- [Crystal-lang](https://crystal-lang.org/) needed for development
- Docker/docker-compose (optional)

### Configuration

Configuration is done through environment variables, `.env` file is read if it exists

- `DISCORD_TOKEN` - Discord token generated from your Discord developer console
- `PREFIX` - Command prefix, defaults to `!`

## Usage

- Clone then compile `shards build`
- `crystal run bin/bot`

### Commands

- `!choose` - Chooses randomly between provided choices
- `!dadjoke` - Random Dad Joke
- `!8ball` - Shake magic 8-ball
- `!flip` - Choose a side and flip a coin
- `!help` - Displays all commands or details about specific command
- `!ping` - Pings the bot
- `!roll` - Roll a 6-sided die
- `!time` - Displays the bot's time
- `!uptime` - Displays the bot's uptime
- `!ud` - Urban Dictionary definition

### Auto-Reactions

- :beers: emoji reaction to anything saying "cheers"
- :peanuts: emoji reaction to any variation of "nuts", "nutty"

## Contributors

- [Elliot DeNolf](https://github.com/denolfe) - creator and maintainer