Skip to content

Commit

Permalink
update bot_commands.py
Browse files Browse the repository at this point in the history
  • Loading branch information
5hojib committed Jan 8, 2025
1 parent 89767c9 commit 0127b91
Showing 1 changed file with 41 additions and 48 deletions.
89 changes: 41 additions & 48 deletions bot/helper/telegram_helper/bot_commands.py
Original file line number Diff line number Diff line change
@@ -1,51 +1,44 @@
from bot.core.config_manager import Config

i = Config.CMD_SUFFIX


class BotCommands:
def __init__(self):
self.StartCommand = f"start{Config.CMD_SUFFIX}"
self.MirrorCommand = [f"mirror{Config.CMD_SUFFIX}", f"m{Config.CMD_SUFFIX}"]
self.YtdlCommand = [f"ytdl{Config.CMD_SUFFIX}", f"y{Config.CMD_SUFFIX}"]
self.LeechCommand = [f"leech{Config.CMD_SUFFIX}", f"l{Config.CMD_SUFFIX}"]
self.YtdlLeechCommand = [
f"ytdlleech{Config.CMD_SUFFIX}",
f"yl{Config.CMD_SUFFIX}",
]
self.CloneCommand = f"clone{Config.CMD_SUFFIX}"
self.MediaInfoCommand = f"mediainfo{Config.CMD_SUFFIX}"
self.CountCommand = f"count{Config.CMD_SUFFIX}"
self.DeleteCommand = f"del{Config.CMD_SUFFIX}"
self.CancelAllCommand = f"cancelall{Config.CMD_SUFFIX}"
self.ForceStartCommand = [
f"forcestart{Config.CMD_SUFFIX}",
f"fs{Config.CMD_SUFFIX}",
]
self.ListCommand = f"list{Config.CMD_SUFFIX}"
self.SearchCommand = f"search{Config.CMD_SUFFIX}"
self.StatusCommand = f"status{Config.CMD_SUFFIX}"
self.UsersCommand = f"users{Config.CMD_SUFFIX}"
self.AuthorizeCommand = f"authorize{Config.CMD_SUFFIX}"
self.UnAuthorizeCommand = f"unauthorize{Config.CMD_SUFFIX}"
self.AddSudoCommand = f"addsudo{Config.CMD_SUFFIX}"
self.RmSudoCommand = f"rmsudo{Config.CMD_SUFFIX}"
self.PingCommand = f"ping{Config.CMD_SUFFIX}"
self.RestartCommand = f"restart{Config.CMD_SUFFIX}"
self.RestartSessionsCommand = f"restartses{Config.CMD_SUFFIX}"
self.StatsCommand = f"stats{Config.CMD_SUFFIX}"
self.HelpCommand = f"help{Config.CMD_SUFFIX}"
self.LogCommand = f"log{Config.CMD_SUFFIX}"
self.ShellCommand = f"shell{Config.CMD_SUFFIX}"
self.AExecCommand = f"aexec{Config.CMD_SUFFIX}"
self.ExecCommand = f"exec{Config.CMD_SUFFIX}"
self.ClearLocalsCommand = f"clearlocals{Config.CMD_SUFFIX}"
self.BotSetCommand = f"botsettings{Config.CMD_SUFFIX}"
self.UserSetCommand = f"settings{Config.CMD_SUFFIX}"
self.SpeedTest = f"speedtest{Config.CMD_SUFFIX}"
self.BroadcastCommand = [f"broadcast{Config.CMD_SUFFIX}", "broadcastall"]
self.SelectCommand = f"sel{Config.CMD_SUFFIX}"
self.RssCommand = f"rss{Config.CMD_SUFFIX}"


# BotCommands = _BotCommands()
StartCommand = f"start{Config.CMD_SUFFIX}"
MirrorCommand = [f"mirror{Config.CMD_SUFFIX}", f"m{Config.CMD_SUFFIX}"]
YtdlCommand = [f"ytdl{Config.CMD_SUFFIX}", f"y{Config.CMD_SUFFIX}"]
LeechCommand = [f"leech{Config.CMD_SUFFIX}", f"l{Config.CMD_SUFFIX}"]
YtdlLeechCommand = [
f"ytdlleech{Config.CMD_SUFFIX}",
f"yl{Config.CMD_SUFFIX}",
]
CloneCommand = f"clone{Config.CMD_SUFFIX}"
MediaInfoCommand = f"mediainfo{Config.CMD_SUFFIX}"
CountCommand = f"count{Config.CMD_SUFFIX}"
DeleteCommand = f"del{Config.CMD_SUFFIX}"
CancelAllCommand = f"cancelall{Config.CMD_SUFFIX}"
ForceStartCommand = [
f"forcestart{Config.CMD_SUFFIX}",
f"fs{Config.CMD_SUFFIX}",
]
ListCommand = f"list{Config.CMD_SUFFIX}"
SearchCommand = f"search{Config.CMD_SUFFIX}"
StatusCommand = f"status{Config.CMD_SUFFIX}"
UsersCommand = f"users{Config.CMD_SUFFIX}"
AuthorizeCommand = f"authorize{Config.CMD_SUFFIX}"
UnAuthorizeCommand = f"unauthorize{Config.CMD_SUFFIX}"
AddSudoCommand = f"addsudo{Config.CMD_SUFFIX}"
RmSudoCommand = f"rmsudo{Config.CMD_SUFFIX}"
PingCommand = f"ping{Config.CMD_SUFFIX}"
RestartCommand = f"restart{Config.CMD_SUFFIX}"
RestartSessionsCommand = f"restartses{Config.CMD_SUFFIX}"
StatsCommand = f"stats{Config.CMD_SUFFIX}"
HelpCommand = f"help{Config.CMD_SUFFIX}"
LogCommand = f"log{Config.CMD_SUFFIX}"
ShellCommand = f"shell{Config.CMD_SUFFIX}"
AExecCommand = f"aexec{Config.CMD_SUFFIX}"
ExecCommand = f"exec{Config.CMD_SUFFIX}"
ClearLocalsCommand = f"clearlocals{Config.CMD_SUFFIX}"
BotSetCommand = f"botsettings{Config.CMD_SUFFIX}"
UserSetCommand = f"settings{Config.CMD_SUFFIX}"
SpeedTest = f"speedtest{Config.CMD_SUFFIX}"
BroadcastCommand = [f"broadcast{Config.CMD_SUFFIX}", "broadcastall"]
SelectCommand = f"sel{Config.CMD_SUFFIX}"
RssCommand = f"rss{Config.CMD_SUFFIX}"

0 comments on commit 0127b91

Please sign in to comment.