Reputation: 11
I'm trying to make the bot say "Hey (user) here is a download link for hxd" Can anyone help me?
async def hxd(ctx):
await client.say('Here is a download link for hxd')
Upvotes: 1
Views: 50
Reputation: 3994
Every discord.Member
object has a mention
attribute.
Here's how you use it:
@client.command()
async def hxd(ctx):
await client.say(f"Hey {ctx.author.mention}! Here's a download link for hxd")
Upvotes: 2
Reputation: 27577
You can use getpass.getuser()
:
from getpass import getuser
async def hxd(ctx):
await client.say(f'Hey {getuser()} here is a download link for hxd')
Upvotes: -1