D
D
demon666top2021-09-09 08:20:07
Python
demon666top, 2021-09-09 08:20:07

How to make it so that if the admin is lower than the elder but he could not ban him (How to make a ban for a while and a reason)?

Script

#Ban ----------------------------------------------------------------------------------
@bot.command(pass_context=True)
@commands.has_permissions(view_audit_log=True)
async def ban(ctx,member:discord.Member,time:int,reason):
   channel = Bot.get_channel(861401781799354390)
   bag = discord.Embed(title="Бан",color=0xff0000)
   await ctx.channel.purge(limit=0)
   bag.add_field(name='Модератор',value=ctx.message.author.mention,inline=False)
   bag.add_field(name='Нарушитель',value=member.mention,inline=False)
   bag.add_field(name='Причина',value=reason,inline=False)
   bag.add_field(name="Время",value=time,inline=False)
   await channel.send(embed = bag)
#Ban
-------------------------------------------------- -------------------------------- I'm banning but not banning somewhere error

Answer the question

In order to leave comments, you need to log in

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question