def log(self, ctx, *, user: str):
"""Shows mod log entries for a user.
Only searches the past 300 cases.
"""
mod_log = ctx.message.server.get_channel('222010090226581504')
entries = []
async for m in self.bot.logs_from(mod_log, limit=300):
entry = self.pollr.match(m.content)
if entry is None:
continue
if user in entry.group('user'):
entries.append(m.content)
fmt = 'Found {} entries:\n{}'
await self.bot.say(fmt.format(len(entries), '\n\n'.join(entries)))
评论列表
文章目录