def cmds(self, ctx):
"""Show all custom commands."""
if ctx.invoked_subcommand is None:
ttl = None if ctx.message.content.endswith(' stay') else 20
p = commands.Paginator(prefix='```css')
cmds = read_json("commands")
p.add_line('[List of Custom Commands]')
msg = []
for cmd in sorted(cmds):
msg.append(cmd)
if cmd == list(sorted(cmds))[-1] or len(msg) % 5 == 0 and len(msg) != 0:
p.add_line(', '.join(x for x in msg))
msg = []
for page in p.pages:
await ctx.send(page, delete_after=ttl)
await ctx.message.delete()
# List all custom commands with Links
评论列表
文章目录