mirror of
https://github.com/cdryzun/tg_bot_collections.git
synced 2025-05-02 11:07:09 +08:00
chore: rename available_commands to list_available_commands
This commit is contained in:
parent
d410f48db6
commit
73a9c20bc7
@ -82,7 +82,7 @@ def load_handlers(bot: TeleBot, disable_commands: list[str]) -> None:
|
||||
print("Setting commands done.")
|
||||
|
||||
|
||||
def available_commands() -> list[str]:
|
||||
def list_available_commands() -> list[str]:
|
||||
commands = []
|
||||
this_path = Path(__file__).parent
|
||||
for child in this_path.iterdir():
|
||||
|
4
tg.py
4
tg.py
@ -2,7 +2,7 @@ import argparse
|
||||
|
||||
from telebot import TeleBot
|
||||
|
||||
from handlers import available_commands, load_handlers
|
||||
from handlers import list_available_commands, load_handlers
|
||||
|
||||
|
||||
def main():
|
||||
@ -19,7 +19,7 @@ def main():
|
||||
dest="disable_commands",
|
||||
help="Specify a command to disable. Can be used multiple times.",
|
||||
default=[],
|
||||
choices=available_commands(),
|
||||
choices=list_available_commands(),
|
||||
)
|
||||
|
||||
options = parser.parse_args()
|
||||
|
Loading…
x
Reference in New Issue
Block a user