royalbot.py 文件源码

python
阅读 19 收藏 0 点赞 0 评论 0

项目:royal-bot-the-third 作者: Steffo99 项目源码 文件源码
def helpme(bot, thing, arguments):
    """Visualizza il messaggio di aiuto di un comando.

Sintassi: `{symbol}helpme [comando]`"""
    # Set status to typing
    await status_typing(bot, thing)
    # If no command is specified, show the help message for this command.
    if len(arguments) == 0 or len(arguments) > 1:
        await display_help(bot, thing, helpme)
        return
    # Check the list of telegram commands if the message was sent from Telegram
    if isinstance(thing, telegram.Update):
        if arguments[0] in b.commands:
            await display_help(bot, thing, b.commands[arguments[0]])
        else:
            await answer(bot, thing, "? Il comando specificato non esiste.")
    # Check the list of discord commands if the message was sent from Discord
    if isinstance(thing, extradiscord.discord.Message):
        if arguments[0] in d.commands:
            await display_help(bot, thing, d.commands[arguments[0]])
        else:
            await answer(bot, thing, "? Il comando specificato non esiste.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号