From ac5867016add3453104610a0c0f6fb88b11e2f06 Mon Sep 17 00:00:00 2001 From: Elliot Goodrich Date: Tue, 20 Feb 2024 21:23:12 +0000 Subject: [PATCH] Remove double space in `/peek` message --- discord_handler/discord_handler.py | 2 +- discord_handler/test_discord_handler.py | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/discord_handler/discord_handler.py b/discord_handler/discord_handler.py index 7161c38..63c1f23 100644 --- a/discord_handler/discord_handler.py +++ b/discord_handler/discord_handler.py @@ -97,7 +97,7 @@ def display_users_by_nomination(users): vote_count = film.CastVotes + film.AttendanceVotes # Surround links with <> to avoid Discord previewing the links film = ( - f" [{film.FilmName}]()" + f"[{film.FilmName}]()" if film.IMDbID is not None else film.FilmName ) diff --git a/discord_handler/test_discord_handler.py b/discord_handler/test_discord_handler.py index 3dc4b2e..819e2e8 100644 --- a/discord_handler/test_discord_handler.py +++ b/discord_handler/test_discord_handler.py @@ -306,7 +306,7 @@ def test_workflow(self): "data": { "content": "The current list of nominations are:\n" + "1. My Film Name (0 🗳) <@abc>\n" - + "2. [My Other Film]() (0 🗳) <@def>", + + "2. [My Other Film]() (0 🗳) <@def>", "flags": DiscordFlag.EPHEMERAL_FLAG, }, }, @@ -461,7 +461,7 @@ def test_workflow(self): "data": { "content": "The current list of nominations are:\n" + "1. My Film Name (1 🗳) <@abc>\n" - + "2. [My Other Film]() (0 🗳) <@def>", + + "2. [My Other Film]() (0 🗳) <@def>", "flags": DiscordFlag.EPHEMERAL_FLAG, }, }, @@ -601,7 +601,7 @@ def test_workflow(self): "type": DiscordResponse.CHANNEL_MESSAGE_WITH_SOURCE, "data": { "content": "The current list of nominations are:\n" - + "1. [My Other Film]() (1 🗳) <@def>\n" + + "1. [My Other Film]() (1 🗳) <@def>\n" + "2. [No nomination] <@abc>", "flags": DiscordFlag.EPHEMERAL_FLAG, }, @@ -751,7 +751,7 @@ def test_workflow(self): "type": DiscordResponse.CHANNEL_MESSAGE_WITH_SOURCE, "data": { "content": "The current list of nominations are:\n" - + "1. [My Other Film]() (1 🗳) <@def>\n" + + "1. [My Other Film]() (1 🗳) <@def>\n" + "2. [No nomination] <@abc>", "flags": DiscordFlag.EPHEMERAL_FLAG, },