kimchi

command module
v0.0.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 26, 2021 License: MIT Imports: 11 Imported by: 0

README

Kimchi

An easily customisable discord bot

Getting Started

Discord

You will need to create a new Discord Bot in order to run Kimchi. To do this, head on over to the Discord Developer Portal and create a new application.

In the "OAuth2" section of the settings, select bot as the scope for the application, and Send Messages as the permission (the required permissions may change in the future). Open the generated URL and invite the bot to your Discord server.

Bot Config

In order use Kimchi, you need to prvoide a config file. The sample below specifies the bot token (you can find yours here), as well as a couple of basic chat actions that the bot can respond to. You can add and customise these to your liking.

The file should be saved as bot.config.json in the root directory for the project.

{
  "token": "your-bot-token",
  "logLevel": "info",
  "customActions": [
    {
      "name": "I lost the game",
      "type": "simpleChat",
      "trigger": "the game",
      "config": {
        "responses": ["_Sigh..._ Thanks, {author}. I lost the game."]
      }
    },
    {
      "name": "motd",
      "type": "simpleChat",
      "trigger": "^!motd",
      "config": {
        "responses": ["Sometimes people are just stupid :man_shrugging:"]
      }
    }
  ]
}
Running Locally

See "Development Setup" below.

Running with Docker Compose

You can easily start up your bot by using the nerdenough/kimchi docker image. You will also need to mount your config, as shown in the example below.

version: "3"

services:
  kimchi:
    image: nerdenough/kimchi
    volumes:
      - ./bot.config.json:/go/src/app/bot.config.json

Development Setup

Prerequisites

Ensure you have Go set up on your machine.

Clone the repository into your Go workspace and install the dependencies.

# Clone repo
git clone git@github.com:nerdenough/kimchi.git

# Install dependencies
go get
Running Kimchi

In order to run Kimchi, you will need your Bot Token. You can find this on the Bot tab of your Discord application. You can then run Kimchi with the following command:

go run main.go
Tests
go test ./...

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
pkg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL