mirror of
https://github.com/brandons209/Red-bot-Cogs.git
synced 2024-05-27 07:41:01 +12:00
fix issue when listing roles in server with no personal roles assigned
This commit is contained in:
parent
8a55a50017
commit
62b4054a33
|
@ -126,6 +126,9 @@ class PersonalRoles(commands.Cog):
|
||||||
),
|
),
|
||||||
}
|
}
|
||||||
assigned_roles.append(dic)
|
assigned_roles.append(dic)
|
||||||
|
if not assigned_roles:
|
||||||
|
await ctx.send(chat.info(_("There is no assigned personal roles on this server")))
|
||||||
|
return
|
||||||
pages = list(chat.pagify(tabulate(assigned_roles, headers="keys", tablefmt="orgtbl")))
|
pages = list(chat.pagify(tabulate(assigned_roles, headers="keys", tablefmt="orgtbl")))
|
||||||
pages = [chat.box(page) for page in pages]
|
pages = [chat.box(page) for page in pages]
|
||||||
await menu(ctx, pages, DEFAULT_CONTROLS)
|
await menu(ctx, pages, DEFAULT_CONTROLS)
|
||||||
|
|
Loading…
Reference in a new issue