From 1344d3d6be3e6d244207996784987db5e48523a6 Mon Sep 17 00:00:00 2001 From: MarkKoz Date: Tue, 4 Aug 2020 12:20:52 -0700 Subject: Utils: show error message for long poll titles Embeds have a maximum length of 256 for titles. Fixes #1079 Fixes BOT-7Q --- bot/cogs/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/bot/cogs/utils.py b/bot/cogs/utils.py index 91c6cb36e..d96abbd5a 100644 --- a/bot/cogs/utils.py +++ b/bot/cogs/utils.py @@ -232,6 +232,8 @@ class Utils(Cog): A maximum of 20 options can be provided, as Discord supports a max of 20 reactions on a single message. """ + if len(title) > 256: + raise BadArgument("The title cannot be longer than 256 characters.") if len(options) < 2: raise BadArgument("Please provide at least 2 options.") if len(options) > 20: -- cgit v1.2.3