Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
If I understand you correctly, then:
@bot.command()
async def kill(ctx, member:discord.Member=None):
if member != None: # если пользователь указан
await ctx.message.delete() # удаляем наше сообщение
await ctx.send(f"Пиу! {member.mention}") # отправляем сообщение
else: # если пользователь не указан, выдаем сообщение
await ctx.send("Ой! Ты не указал пользователя!")
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question