JeepartN
JeepartN

Reputation: 31

Discord bot Help command

So I'm trying to change description for the commands when people use the help command that comes with discord.py.

but i just don't really seem to get how or where to put this description.

I'm also trying to make different categories like Music in the help list but i really just don't know where to start.

I'm really new to python but i have dealt with other programming languages before

My code is quite long but here is a part of it

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!")

Let's say i wanted to add a description to the ping command. where exactly would i do that and how?

Upvotes: 3

Views: 2127

Answers (2)

RedstoneFlux
RedstoneFlux

Reputation: 1

@client.command()
async def ping(*args):
    "here"
    await client.say(":ping_pong: Pong!")

Upvotes: 0

Wright
Wright

Reputation: 3424

@client.command(description="Some ping command") #here
async def ping(*args):
    await client.say(":ping_pong: Pong!")

Upvotes: 3

Related Questions