A Discord bot to detect free verses.
The bot joining to your server detects free verses and reports it by a discord message automatically.
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.
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
ortrue
.
Ruby's version is specified by /.Dockerfile
.
# prepare and run
docker-compose up -d --build
Ruby's version is specified by /.ruby-version
.
For running, these are required:
- MeCab
- in redistribution directory
- mecab-ipadic-NEologd
# prepare
bundle install
# run
bundle exec ruby main.rb
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.
docker run --name freeverse_test ikngtty/freeverse rspec
bundle exec rspec
bundle exec rubocop
Files in this repository without redistribution directory are under the MIT license (the LICENSE file).
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 .