py recently and I would like the bot to send random messages mentioning the user but it gives me this error:
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'NoneType' object has no attribute 'mention'
Here is the code:
@client.command()
async def randomroman(ctx, *,member: discord.Member=None):
mention = member.mention
variable=[
f'{mention} ama tanto roman!',
f'{mention} odia tanto roman!',
f'{mention} ama roman!',
f'{mention} odia roman!'
]
await ctx.message.channel.send(random.choice(variable))