def report(self, ctx, user: discord.Member, *, reason: str):
"""Reporte un utilisateur au staff"""
await self.bot.delete_message(ctx.message)
server = ctx.message.server
Channels = server.channels
End = []
Return = False
for chan in list(Channels):
Name = str(chan.name)
Type = str(chan.type)
if "moderation" in str(chan.name):
if Type is "text":
ModChan = chan
Return = True
if Return is not True:
ModChan = await self.bot.create_channel(server, 'moderation', type=discord.ChannelType.text)
await self.bot.send_message(ModChan, "{0} a été report par {1}, raison : {2}, @here".format(user.mention, ctx.message.author.mention, reason))
评论列表
文章目录