Skip to content

Commit

Permalink
Modified help
Browse files Browse the repository at this point in the history
  • Loading branch information
SVR666 committed Oct 16, 2020
1 parent 99969d2 commit db4177f
Showing 1 changed file with 29 additions and 5 deletions.
34 changes: 29 additions & 5 deletions bot/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,27 +73,52 @@ def log(update, context):

@run_async
def bot_help(update, context):
help_string = f'''
help_string_adm = f'''
/{BotCommands.StartCommand} <b>: Alive or Not</b>
/{BotCommands.MirrorCommand} <b>[url OR magnet_link]: Mirror & upload</b>
/{BotCommands.UnzipMirrorCommand} <b>[url OR magnet_link] : Unzip & mirror</b>
/{BotCommands.TarMirrorCommand} <b>[url OR magnet_link]: Mirror & upload as .tar</b>
/{BotCommands.UnzipMirrorCommand} <b>[url OR magnet_link] : Unzip & mirror</b>
/{BotCommands.WatchCommand} <b>[link]: Mirror YT video</b>
/{BotCommands.TarWatchCommand} <b>[link]: Mirror YT video & upload as .tar</b>
/{BotCommands.CloneCommand} <b>[link]: Mirror drive folder</b>
/{BotCommands.CancelMirror} <b>: Reply to dwnld cmd</b>
/{BotCommands.CancelAllCommand} <b>: Cancel all</b>
/{BotCommands.StatusCommand} <b>: Shows a status of all the downloads</b>
/{BotCommands.ListCommand} <b>[name]: Searches in the drive folder</b>
/{BotCommands.deleteCommand} <b>[link]: Delete from drive(Only owner)</b>
/{BotCommands.StatsCommand} <b>: Show Stats of the machine</b>
/{BotCommands.PingCommand} <b>: Check ping!</b>
/{BotCommands.RestartCommand} <b>: Restart bot(Only owner)</b>
/{BotCommands.AuthorizeCommand} <b>: Authorize(Only owner & sudo)</b>
/{BotCommands.UnAuthorizeCommand} <b>: Unauthorize(Only owner & sudo)</b>
/{BotCommands.AuthorizedUsersCommand} <b>: authorized users(Only owner & sudo)</b>
/{BotCommands.AddSudoCommand} <b>: Add sudo user(Only owner)</b>
/{BotCommands.RmSudoCommand} <b>: Remove sudo users(Only owner)</b>
/{BotCommands.LogCommand} <b>: Get log file(Only owner)</b>
'''
sendMessage(help_string, context.bot, update)

help_string = f'''
/{BotCommands.StartCommand} <b>: Alive or Not</b>
/{BotCommands.MirrorCommand} <b>[url OR magnet_link]: Mirror & upload</b>
/{BotCommands.TarMirrorCommand} <b>[url OR magnet_link]: Mirror & upload as .tar</b>
/{BotCommands.UnzipMirrorCommand} <b>[url OR magnet_link] : Unzip & mirror</b>
/{BotCommands.WatchCommand} <b>[link]: Mirror YT video</b>
/{BotCommands.TarWatchCommand} <b>[link]: Mirror YT video & upload as .tar</b>
/{BotCommands.CloneCommand} <b>[link]: Mirror drive folder</b>
/{BotCommands.CancelMirror} <b>: Reply to dwnld cmd</b>
/{BotCommands.CancelAllCommand} <b>: Reply to dwnld cmd</b>
/{BotCommands.StatusCommand} <b>: Shows a status of all the downloads</b>
/{BotCommands.ListCommand} <b>[name]: Searches in the drive folder</b>
/{BotCommands.StatsCommand} <b>: Show Stats of the machine</b>
/{BotCommands.PingCommand} <b>: Check ping!</b>
'''

if CustomFilters.sudo_user(update) or CustomFilters.owner_filter(update):
sendMessage(help_string_adm, context.bot, update)
else:
sendMessage(help_string, context.bot, update)


def main():
Expand All @@ -105,8 +130,7 @@ def main():
restart_message.edit_text("Restarted Successfully!")
remove('restart.pickle')

start_handler = CommandHandler(BotCommands.StartCommand, start,
filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
start_handler = CommandHandler(BotCommands.StartCommand, start)
ping_handler = CommandHandler(BotCommands.PingCommand, ping,
filters=CustomFilters.authorized_chat | CustomFilters.authorized_user)
restart_handler = CommandHandler(BotCommands.RestartCommand, restart,
Expand Down

0 comments on commit db4177f

Please sign in to comment.