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

スラッシュコマンド用ヘルプ

Arguments:
  • m (MessageParserProtocol): メッセージデータ