Skip to content
This repository has been archived by the owner on Nov 23, 2024. It is now read-only.
/ mahjong_chatbot Public archive

Slack上で麻雀(もどき)を Play するためのチャットボットアプリケーション

Notifications You must be signed in to change notification settings

kozyszoo/mahjong_chatbot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

What is this?

  • Slack上で麻雀(もどき)を Play するためのチャットボットアプリケーション
  • Chatbot として Ruboty を利用

Requirment

  • Ruby 2.3.0

How to start chatbot

リポジトリをクローン

$ git clone
$ cd mahjang_chatbot
$ bundle install

Slackグループの管理者権限でXMPPを有効にする

Slack group の Token を取得して環境変数として設定

$ export SLACK_TOKEN=xoxb-XXXX....

https://api.slack.com/custom-integrations/legacy-tokens から取得できます

Chatbot アプリケーションの起動

$ bundle exec ruboty -l mahjang.rb

How to play in Slack

アプリケーションを起動させたら、bot に対して メンション か DM を送ることで麻雀を始めることができます

例. bot名が mj の場合

@mj start # Start to play mahjang
@mj [number] # Discard tiles

play_image

How to add emoji

麻雀牌の絵文字を slack に追加させるには下記2つのどちらかのツールをご利用ください。 また、麻雀牌の絵文字は http://sozai.7gates.net/docs/mahjong01/ から頂きました。

1. Emoji import tool の利用

$ bundle exec ruby import.rb

2. Slack Emoji Tools Add-on の利用

'Slack Emoji Tools' Add-on を使用すると、Drag&Drop でまとめて絵文字を追加可能

About

Slack上で麻雀(もどき)を Play するためのチャットボットアプリケーション

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages