arsley / fidop

A discord bot for owned server powered by slash-create
https://fidop.vercel.app
1 stars 0 forks source link

麻雀コマンド作る #8

Open arsley opened 2 years ago

arsley commented 2 years ago

概要

コマンドの構想だけしてみた。 なんとなくFirebaseの練習したいからそこにデータ貯めようかなという予定。 ちゃんとやるならWebアプリ化したほうがいいんじゃないかっていうレベルの感じになりそう。

# ユーザ登録(初回のみ)
/marjong users create <username>
/marjong users get_all
/marjong users update <username> <new_username>
/marjong users delete <username>

# shorthand
/m u c
/m u ga
/m u u
/m u d

# 遊んだ日の「局全体」を「トーナメント」として登録
/marjong tournaments create <name>
/marjong tournaments get_all
/marjong tournaments update <name> <new_name>
/marjong tournaments delete <id>

/marjong tournaments next_game
/marjong tournaments current_game
/marjong tournaments finish

# shorthand
/m t c
/m t ga
/m t u
/m t d
/m t ng
/m t now
/m t fi

# スコア登録
/marjong scores register <username> <actual_score>
/marjong scores get_current
/marjong scores update <username> <game_number> <actual_score>
/marjong scores delete <username> <game_number>

# shorthand
/m s r
/m s gc
/m s u
/m s d

使い方想定例

# ユーザ登録する
/marjong users create usera
/marjong users create userb
/marjong users create userc
/marjong users create userd

# 局まとめるデータ作る
/marjong tournaments create 健康麻雀会5/28

# 対局する

# 局終わって点数計算済んだら登録する
/marjong scores register usera 35000
/marjong scores register userb 30000
/marjong scores register userc 20000
/marjong scores register userd 15000

# 次の局にすすめる
/marjong tournaments next_game

# 終わったらやめる
/marjong tournaments finish
arsley commented 2 years ago

google-spreadsheet npm なるものがあるみたいなのでこれ使えればスプレッドシートでもいいかも(共有も編集も楽だし)。

arsley commented 2 years ago

API Backend を別で作ることにします。