integrations.slack.events.slash
integrations/slack/events/slash.py
1""" 2integrations/slack/events/slash.py 3""" 4 5from typing import TYPE_CHECKING 6 7from libs.types import StyleOptions 8 9if TYPE_CHECKING: 10 from integrations.protocols import MessageParserProtocol 11 12 13def command_help(m: "MessageParserProtocol"): 14 """スラッシュコマンド用ヘルプ 15 16 Args: 17 m (MessageParserProtocol): メッセージデータ 18 """ 19 20 msg = "```使い方:" 21 msg += f"\n\t{m.status.command_name} help このメッセージ" 22 msg += "\n\t--- 成績管理 ---" 23 msg += f"\n\t{m.status.command_name} results 成績出力" 24 msg += f"\n\t{m.status.command_name} ranking ランキング出力" 25 msg += f"\n\t{m.status.command_name} graph ポイント推移グラフを表示" 26 msg += f"\n\t{m.status.command_name} report レポート表示" 27 msg += "\n\t--- データベース操作 ---" 28 msg += f"\n\t{m.status.command_name} check データ突合" 29 msg += f"\n\t{m.status.command_name} download データベースダウンロード" 30 msg += "\n\t--- メンバー管理 ---" 31 msg += f"\n\t{m.status.command_name} member 登録されているメンバー" 32 msg += f"\n\t{m.status.command_name} add | del メンバーの追加/削除" 33 msg += "\n\t--- チーム管理 ---" 34 msg += f"\n\t{m.status.command_name} team_create <チーム名> チームの新規作成" 35 msg += f"\n\t{m.status.command_name} team_del <チーム名> チームの削除" 36 msg += f"\n\t{m.status.command_name} team_add <チーム名> <メンバー名> チームにメンバーを登録" 37 msg += f"\n\t{m.status.command_name} team_remove <メンバー名> 指定したメンバーを未所属にする" 38 msg += f"\n\t{m.status.command_name} team_list チーム名と所属メンバーを表示" 39 msg += f"\n\t{m.status.command_name} team_clear チームデータをすべて削除" 40 msg += "```" 41 42 m.set_data("ヘルプ", msg, StyleOptions())
14def command_help(m: "MessageParserProtocol"): 15 """スラッシュコマンド用ヘルプ 16 17 Args: 18 m (MessageParserProtocol): メッセージデータ 19 """ 20 21 msg = "```使い方:" 22 msg += f"\n\t{m.status.command_name} help このメッセージ" 23 msg += "\n\t--- 成績管理 ---" 24 msg += f"\n\t{m.status.command_name} results 成績出力" 25 msg += f"\n\t{m.status.command_name} ranking ランキング出力" 26 msg += f"\n\t{m.status.command_name} graph ポイント推移グラフを表示" 27 msg += f"\n\t{m.status.command_name} report レポート表示" 28 msg += "\n\t--- データベース操作 ---" 29 msg += f"\n\t{m.status.command_name} check データ突合" 30 msg += f"\n\t{m.status.command_name} download データベースダウンロード" 31 msg += "\n\t--- メンバー管理 ---" 32 msg += f"\n\t{m.status.command_name} member 登録されているメンバー" 33 msg += f"\n\t{m.status.command_name} add | del メンバーの追加/削除" 34 msg += "\n\t--- チーム管理 ---" 35 msg += f"\n\t{m.status.command_name} team_create <チーム名> チームの新規作成" 36 msg += f"\n\t{m.status.command_name} team_del <チーム名> チームの削除" 37 msg += f"\n\t{m.status.command_name} team_add <チーム名> <メンバー名> チームにメンバーを登録" 38 msg += f"\n\t{m.status.command_name} team_remove <メンバー名> 指定したメンバーを未所属にする" 39 msg += f"\n\t{m.status.command_name} team_list チーム名と所属メンバーを表示" 40 msg += f"\n\t{m.status.command_name} team_clear チームデータをすべて削除" 41 msg += "```" 42 43 m.set_data("ヘルプ", msg, StyleOptions())
スラッシュコマンド用ヘルプ
Arguments:
- m (MessageParserProtocol): メッセージデータ