aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--bot/exts/utils/utils.py28
1 files changed, 19 insertions, 9 deletions
diff --git a/bot/exts/utils/utils.py b/bot/exts/utils/utils.py
index cae7f2593..8d9d27c64 100644
--- a/bot/exts/utils/utils.py
+++ b/bot/exts/utils/utils.py
@@ -162,17 +162,27 @@ class Utils(Cog):
if len(snowflakes) > 1 and await has_no_roles_check(ctx, *STAFF_ROLES):
raise BadArgument("Cannot process more than one snowflake in one invocation.")
+ if not snowflakes:
+ raise BadArgument("At least one snowflake must be provided.")
+
+ embed = Embed(colour=Colour.blue())
+ embed.set_author(
+ name=f"Snowflake{'s'[:len(snowflakes)^1]}", # Deals with pluralisation
+ icon_url="https://github.com/twitter/twemoji/blob/master/assets/72x72/2744.png?raw=true"
+ )
+
+ lines = []
for snowflake in snowflakes:
created_at = snowflake_time(snowflake)
- embed = Embed(
- description=f"**Created at {created_at}** ({time_since(created_at, max_units=3)}).",
- colour=Colour.blue()
- )
- embed.set_author(
- name=f"Snowflake: {snowflake}",
- icon_url="https://github.com/twitter/twemoji/blob/master/assets/72x72/2744.png?raw=true"
- )
- await ctx.send(embed=embed)
+ lines.append(f"**{snowflake}**\nCreated at {created_at} ({time_since(created_at, max_units=3)}).")
+
+ await LinePaginator.paginate(
+ lines,
+ ctx=ctx,
+ embed=embed,
+ max_lines=5,
+ max_size=1000
+ )
@command(aliases=("poll",))
@has_any_role(*MODERATION_ROLES, Roles.project_leads, Roles.domain_leads)