client_helpers.py 文件源码

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

项目:randi 作者: nhatzHK 项目源码 文件源码
def generate_help(commands, config):
    e_title = config['help']['title']
    e_colour = discord.Colour (0x123654)
    e_url = config['help']['url']
    e_desc = config['help']['description']
    for com in commands:
        if 'usage' in commands[com]:
            h = f"**{com}** \n\t{commands[com]['description']}\
                    \n\t`@xkcd {commands[com]['usage']}`"

            if 'alias' in commands[com]:
                h += f"\n\tAliases: `{'`, `'.join(commands[com]['alias'])}`"

            e_desc += f"\n\n{h}"

    h_embed = discord.Embed (
            title = e_title,
            colour = e_colour,
            url = e_url,
            description = f"{e_desc}\n\n")
    h_embed.set_footer (
            text = config['help']['footer'],
            icon_url = config['help']['icon_url'])

    return h_embed
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号