diff --git a/classes/commandset.py b/classes/commandset.py new file mode 100644 index 0000000..1434166 --- /dev/null +++ b/classes/commandset.py @@ -0,0 +1,29 @@ +from dataclasses import dataclass +from typing import List, Union +from pyrogram.types import ( + BotCommandScopeAllChatAdministrators, + BotCommandScopeAllGroupChats, + BotCommandScopeAllPrivateChats, + BotCommandScopeChat, + BotCommandScopeChatAdministrators, + BotCommandScopeChatMember, + BotCommandScopeDefault, + BotCommand, +) + + +@dataclass +class CommandSet: + """Command stored in PyroClient's 'commands' attribute""" + + commands: List[BotCommand] + scope: Union[ + BotCommandScopeDefault, + BotCommandScopeAllPrivateChats, + BotCommandScopeAllGroupChats, + BotCommandScopeAllChatAdministrators, + BotCommandScopeChat, + BotCommandScopeChatAdministrators, + BotCommandScopeChatMember, + ] = BotCommandScopeDefault() + language_code: str = "" diff --git a/classes/pyrocommand.py b/classes/pyrocommand.py new file mode 100644 index 0000000..7b01180 --- /dev/null +++ b/classes/pyrocommand.py @@ -0,0 +1,9 @@ +from dataclasses import dataclass + + +@dataclass +class PyroCommand: + """Command stored in PyroClient's 'commands' attribute""" + + command: str + description: str