Reputation: 1830
If I have the user object, how would I get the tag of the user? For example, if I wanted to print something like CircuitSacul#1111
, I would use something like
print(f"{owner.name}:#{owner.tag}")
However, I get the error that "User object has no attribute 'tag'".
Upvotes: 4
Views: 6454
Reputation: 60944
This is the user's discriminator:
@bot.command()
async def tag(ctx):
await ctx.send(ctx.author.discriminator)
Upvotes: 7