Answer the question
In order to leave comments, you need to log in
How to make the bot display the reason normally without _?
@bot.command()
@commands.has_permissions(administrator=True)
async def ban(ctx, member:discord.Member, reason):
channel = bot.get_channel(894969274966368288)
embed = discord.Embed( color=0xff0000, title='ban')
embed.add_field(name='Модератор', value=ctx.message.author.mention)
embed.add_field(name='Пользователь', value=member.mention)
embed.add_field(name='Причина', value=reason)
await member.ban()
await ctx.send(embed=embed)
await channel.send(embed=embed)
Answer the question
In order to leave comments, you need to log in
Do it in this way:
async def ban(ctx, member:discord.Member, *, reason)
!ban User причина бана
async def ban(ctx, member:discord.Member, *reason):
embed.add_field(name='Причина', value=' '.join(reason))
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question