【发布时间】:2018-05-06 14:19:44
【问题描述】:
因此,当人们使用 discord.py 附带的帮助命令时,我正在尝试更改命令的描述。
但我似乎真的不知道如何或在何处放置此描述。
我也在尝试在帮助列表中创建不同的类别,例如音乐,但我真的不知道从哪里开始。
我对 python 很陌生,但我之前接触过其他编程语言
我的代码很长,但这是其中的一部分
client = commands.Bot(command_prefix=commands.when_mentioned_or('?'),
description='Help List', pm_help = True)
client.add_cog(Music(client))
path = 'Blacklist.txt'
bl = open(path, 'r')
@client.event
async def on_ready():
print('---------------------------------------------------------------------------------------')
print('')
print('Logged in as '+client.user.name+' (ID:'+client.user.id+') | Connected to '+str(len(client.servers))+' servers | Connected to '+str(len(set(client.get_all_members())))+' users')
print('')
print('---------------------------------------------------------------------------------------')
print('')
print('Current Discord.py Version: {} | Current Python Version: {}'.format(discord.__version__, platform.python_version()))
print('')
print('---------------------------------------------------------------------------------------')
@client.command()
async def ping(*args):
await client.say(":ping_pong: Pong!")
假设我想为 ping 命令添加描述。我究竟会在哪里以及如何做到这一点?
【问题讨论】: