Giter VIP home page Giter VIP logo

free-verse-discord-bot's Introduction

俳句じゃないやつ検出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 .

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.