def commandstats(self):
p = commands.Paginator()
counter = self.bot.commands_used
width = len(max(counter, key=len))
total = sum(counter.values())
fmt = '{0:<{width}}: {1}'
p.add_line(fmt.format('Total', total, width=width))
for key, count in counter.most_common():
p.add_line(fmt.format(key, count, width=width))
for page in p.pages:
await self.bot.say(page)
评论列表
文章目录