From b0b7afa8ff7af10496a2e111644e6a3663422e1b Mon Sep 17 00:00:00 2001 From: robertsokola Date: Sun, 3 Sep 2023 21:45:36 +0200 Subject: [PATCH] bugfix with emojis Signed-off-by: robertsokola --- src/ui/modals.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/ui/modals.py b/src/ui/modals.py index 3b96e2f..4990904 100644 --- a/src/ui/modals.py +++ b/src/ui/modals.py @@ -35,11 +35,6 @@ async def add_item_to_embed(self) -> PollEmbed: # To avoid circular import from src.ui.button import ButtonBackend - options = { - "name": f"{NUMBER_EMOJIS[len(self.embed.fields)]} {self.new_option.value}", - "value": "**0** | ", - "inline": False, - } date_field = len(self.embed.fields) - 1 # Lmao, not ideal, but it is what it is. @@ -50,7 +45,12 @@ async def add_item_to_embed(self) -> PollEmbed: index = len(self.embed.fields) emoji = len(self.embed.fields) - options["index"] = index + options = { + "name": f"{NUMBER_EMOJIS[emoji]} {self.new_option.value}", + "value": "**0** | ", + "inline": False, + "index": index, + } self.view.add_item( ButtonBackend(