{"id":20106266,"url":"https://github.com/k5342/ikabot3","last_synced_at":"2025-05-06T09:31:53.290Z","repository":{"id":97367905,"uuid":"535061577","full_name":"k5342/ikabot3","owner":"k5342","description":"a friendly discord bot to serve Splatoon 3 stage information (JP) / スプラトゥーン 3 のステージ情報を返却する Discord ボット","archived":false,"fork":false,"pushed_at":"2023-03-02T13:30:25.000Z","size":57,"stargazers_count":10,"open_issues_count":5,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2024-06-21T19:09:16.964Z","etag":null,"topics":["discord-bot","splatoon3"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/k5342.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-09-10T16:55:57.000Z","updated_at":"2023-03-23T10:22:09.000Z","dependencies_parsed_at":"2023-04-18T12:47:03.117Z","dependency_job_id":null,"html_url":"https://github.com/k5342/ikabot3","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5342%2Fikabot3","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5342%2Fikabot3/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5342%2Fikabot3/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/k5342%2Fikabot3/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/k5342","download_url":"https://codeload.github.com/k5342/ikabot3/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224499871,"owners_count":17321601,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord-bot","splatoon3"],"created_at":"2024-11-13T17:49:38.539Z","updated_at":"2024-11-13T17:49:39.289Z","avatar_url":"https://github.com/k5342.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ikabot3\nメンションすると Splatoon 3 のステージ情報を返却する Discord Bot です。\n\nこちらのボットの API はえむおん氏制作の [Spla3 API](https://spla3.yuu26.com/) を情報取得に利用しています。コマンド体系は Project-Cube 様制作の[イカボット](https://cube-library.net/works/co-production-works/splatoon2-bot-discord/)の書式を参考にしています。\n\n## ボット起動方法\n.env に Discord Token と [Spla3 API](https://spla3.yuu26.com/) の注意事項をよく読んだ上で `全ステージ情報をまとめて取得` への URL を記述してください。ボットは以下で起動します。\n```\n% cp .env{.example,}\n% $EDITOR .env # IKABOT3_TOKEN と IKABOT3_API_SOURCE を埋める\n% make build   # ikabot3 バイナリをビルド\n% ./ikabot3\n```\n\n## コマンドの使い方\nDiscord サーバにボットを参加させたのち、ボットに以下のようにキーワードでメンションすると対応するステージ情報を返却します。一部のキーワードはスラッシュコマンドでも呼び出すことができます。\n```\n@ikabot3 オープンマッチ\n```\n\n注: Discord の Message Content Intent を有効にするとメンション無しでも呼び出すことができます。Message Content Intent が利用可能な場合はすべてのメッセージを検索コマンドとして処理し、ステージ情報の検索結果が空でない場合のみメッセージを送信します。Message Content Intent は Privilleged Intent であるため初期値は無効です。Discord の Developer Portal で有効化したのち、.env の `IKABOT3_ALLOW_MESSAGE_CONTENT_INTENT` を `TRUE` にセットします（ボットの入出力の挙動に変化はないですが、Gateway に利用可能な Intent を申告するようになります）。\n\n### 現在のステージ情報を得る\nキーワードに反応します\n- `オープン`, `オープンマッチ`, `/open` ... 現在のオープンマッチのステージ情報を返却します\n- `チャレンジ`, `チャレンジマッチ`, `/challange` ... 現在のチャレンジマッチのステージ情報を返却します\n- `バンカラ`, `バンカラマッチ`, `バカマ`, `/bankara` ... 現在のオープンマッチとチャレンジマッチのステージ情報を返却します\n- `エックス`, `エックスマッチ`, `Xマッチ`, `/x` ... 現在のエックスマッチのステージ情報を返却します\n- `レギュラー`, `レギュラーマッチ`, `/regular` ... 現在のレギュラーマッチのステージ情報を返却します\n- `シャケ`, `サーモンラン`, `サーモン`, `/salmon` ... 現在のサーモンランのステージ情報を返却します\n\n少々正確さを省いて以下の書式にも対応しています\n- `ガチマ`, `ガチマッチ` ... チャレンジマッチと等価です\n- `リグマ`, `リーグマッチ` ... オープンマッチと等価です\n\n### 特定の時刻のステージ情報を得る（サーモンランを除く）\n時刻を指定して問い合わせできます。過去情報は検索対象から除外されます（より正確には API が返却する時刻の範囲に依存します）。時刻は先述のキーワードに続くように時刻を加えるか、キーワードの先頭に○○時のを付加することで検索対象になります。\n\n- `オープンマッチ19` ... 19 時時点のオープンマッチのステージ情報を返却します\n- `1 時のチャレンジマッチ` ... 1 時時点のチャレンジマッチのステージ情報を返却します\n\n### 相対指定で指定した時刻でステージ情報を得る\n時刻指定の代わりに「次の」と記述すると相対指定になります。以下は相対指定を使ったサンプルです。現在開催中のステージ枠の次の開催枠に関する情報を返却します。\n- `次のオープン`\n- `次の次のバンカラマッチ`\n- `次の次の次の次の次の次のチャレンジマッチ`\n- `次のサーモンラン`\n\n上記は、「前の」を入れることでフェイントを加えることができます。\n\n### 特定のルールを検索する\nスケジュールからルールにマッチするステージ情報を検索して返却します。\n- `オープンマッチガチヤグラ` ... オープンマッチで開催されるガチヤグラのうち最も直近のものを返却します\n- `チャレンジアサリ` ... チャレンジマッチで開催されるガチアサリのうち最も直近のものを返却します\n- `ガチホコ` ... チャレンジマッチ、オープンマッチ、X マッチで開催されるガチホコバトルのうち最も直近のものをそれぞれ返却します\n\nルールは以下の表記ゆれに対応しています\n- `(ガチ)?(エリア|ホコ|ホコバトル|ヤグラ|アサリ)`\n\nルール名のみの場合はオープンとチャレンジの両方を返却します。\n\nスラッシュコマンドでは `/rule` コマンドに対応します。\n\n\n### コマンドの例\n他のコマンドの例はテストコード [parser_test.go](./parser_test.go) も参照してみてください。\n\n### キーワード\n(@ikabot3 は適宜読み替えてください)\n```\n@ikabot3 ガチマ\n@ikabot3 次の次の前の次の次のガチマッチ\n@ikabot3 次のガチマ\n@ikabot3 次のオープンマッチ\n@ikabot3 ガチマアサリ\n@ikabot3 次のリグマヤグラ\n@ikabot3 次のナワバリバトル\n@ikabot3 エリア20\n@ikabot3 19 時のガチマッチ\n@ikabot3 ガチマ 20\n@ikabot3 次のエリア\n@ikabot3 次のガチヤグラ\n@ikabot3 シャケ\n@ikabot3 次のサーモンラン\n@ikabot3 次のエックスマッチヤグラ\n```\n\n### スラッシュコマンド\n```\n/open\n/challange\n/bankara\n/regular\n/x\n/salmon\n/rule\n```\n\n## 実行例\n\n### オープンマッチ（時刻指定）\n時刻を指定して検索できます。\n\n![image](https://user-images.githubusercontent.com/1993005/222441139-38693b2b-2d27-4c5f-94ac-48d054da4603.png)\n\n### サーモンラン（相対指定のみ）\n最も直近に開催されるものを起点に相対指定に対応します。\n\n![image](https://user-images.githubusercontent.com/1993005/222440646-66baf4fb-3f55-4062-87e5-ce10eb30066c.png)\n![image](https://user-images.githubusercontent.com/1993005/222440423-bc0f1802-bb64-4743-bd3c-3f9d125b7bb2.png)\n\n### ルール名で検索（相対指定のみ）\nチャレンジ、オープン、X マッチの中からそれぞれ検索します。\n\n![image](https://user-images.githubusercontent.com/1993005/222440571-129d9757-dcce-44f4-b8a8-1d6443b2a4d0.png)\n\n\n## TODO\n- More slash commands\n- More unit tests\n- Configuration file (customize UA)\n- Cosmetic changes (color output for Discord embeds)\n- Cleanup codes\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk5342%2Fikabot3","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fk5342%2Fikabot3","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fk5342%2Fikabot3/lists"}