Python
- 4 ответа
- 0 вопросов
2
Вклад в тег
@commands.has_permissions(ban_members=True)
async def ban(ctx, member: discord.Member, days=1):
if member is None:
await ctx.send(f'{error_emoji} **Пожалуйста, укажите пользователя!** {error_emoji}')
else:
try:
await ctx.guild.ban(member, delete_message_days=0)
await ctx.send('User banned for **' + str(days) + ' day(s)**')
ban_list.append(member)
day_list.append(days * 24 * 60 * 60)
server_list.append(ctx.message.server)
except:
await ctx.send('Error! User not active')