Answer the question
In order to leave comments, you need to log in
How to mention a person by getting only their id in discord.py?
I have code:
await ctx.send(f'**Упомяните** пользователя у которого хотите **забрать** доступ к комнате!. Для этого у вас есть 20 секунд!', delete_after=20)
res = await self.bot.wait_for("message", check=lambda i: i.author == member, timeout=20)
await res.delete()
id_mem = res.content\
.replace("<", "")\
.replace("@", "")\
.replace("!", "")\
.replace(">", "")
print(id_mem)
user = ctx.guild.get_member(id_mem)
await ctx.send(f'пользователь: {user}')
channel4 = self.bot.get_channel(channel1)
await channel4.set_permissions(user, connect=False)
await ctx.send(f'{member.mention}, вы **закрыли доступ** в комнату пользователю {user.mention}')
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question