def write_to_modlog(self, message, author, server, reason):
self.action_dict['actions_taken'] += 1
if server.id in self.server_index:
config = self.server_index[server.id]
else:
return
if not config[8] or not config[10][0]:
return
if not reason:
reason = "***No Reason Specified***"
content = message.clean_content
else:
content = message.clean_content.replace('\"{}\"'.format(reason), '')
await self.safe_send_message(discord.Object(id=config[8]),
'At `{}` UTC in **<#{}>**, **{}** used the command ```{}```Reason: `{}`'
''.format(datetime.utcnow().strftime("%H:%M:%S on %a %b %d"), message.channel.id,
clean_string(author.name), content, reason), server=server)
评论列表
文章目录