tignear / free-verse-discord-bot

A Discord bot to detect free verses.

Home Page:https://discordapp.com/api/oauth2/authorize?client_id=616688590919041062&permissions=3072&scope=bot

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

俳句じゃないやつ検出bot

A Discord bot to detect free verses.

Usage

Detection

The bot joining to your server detects free verses and reports it by a discord message automatically.

Commands

Commands can be run by a mention to the bot.

Commands:

  • @<bot> mecab <text>
    • Shows MeCab result about the specified text by a discord message.
  • @<bot> info
    • DEBUG MODE ONLY
    • Shows informations for debugging by discord messages.

Development

Requirements

When running or deploying this bot, set these environment variables.

  • DISCORD_BOT_TOKEN
    • Required
  • DEBUG_MODE
    • Not required
    • To turn debug mode on, set 1 or true.

Run

with Docker

Ruby's version is specified by /.Dockerfile.

# prepare and run
docker-compose up -d --build

in Local

Ruby's version is specified by /.ruby-version.

For running, these are required:

# prepare
bundle install

# run
bundle exec ruby main.rb

Deploy

heroku create free-verse-discord-bot
heroku stack:set container
heroku config:set DISCORD_BOT_TOKEN=$DISCORD_BOT_TOKEN
heroku config:set DEBUG_MODE=$DEBUG_MODE
git push heroku master
heroku ps:scale bot=1

or use GitHub Integration.

Test

with Docker

docker run --name freeverse_test ikngtty/freeverse rspec

in Local

bundle exec rspec

Lint

in Local

bundle exec rubocop

License

Files in this repository without redistribution directory are under the MIT license (the LICENSE file).

MeCab

This repository includes MeCab programs.

Source of the main program is redistribution/mecab-0.996.tar.gz , which is downloaded from here and is included under the BSD license, which copy is redistribution/mecab-0.996-license .

About

A Discord bot to detect free verses.

https://discordapp.com/api/oauth2/authorize?client_id=616688590919041062&permissions=3072&scope=bot

License:MIT License


Languages

Language:Ruby 92.8%Language:Dockerfile 7.2%