Skip to content

Commit

Permalink
chore: improve messages of /remove, /goto
Browse files Browse the repository at this point in the history
  • Loading branch information
tristiisch committed Nov 18, 2024
1 parent 5ca59b8 commit 4170f5d
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/pyramid/connector/discord/guild_cmd.py
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ async def remove(self, ms: MessageSenderQueued, ctx: Interaction, number_in_queu

if number_in_queue <= 0:
ms.add_message(
content=f"Unable to remove element with the number {number_in_queue} in the queue"
content="Unable to remove element at position %d in the queue" % number_in_queue
)
return False

Expand All @@ -152,7 +152,7 @@ async def remove(self, ms: MessageSenderQueued, ctx: Interaction, number_in_queu
track_deleted = self.queue.remove(number_in_queue - 1)
if track_deleted is None:
ms.add_message(
content=f"There is no element with the number {number_in_queue} in the queue"
content="There is no element at position %d in the queue" % number_in_queue
)
return False

Expand All @@ -166,7 +166,7 @@ async def goto(self, ms: MessageSenderQueued, ctx: Interaction, number_in_queue:

if number_in_queue <= 0:
ms.add_message(
content=f"Unable to go to element with number {number_in_queue} in the queue"
content="Unable to access the element at position %d in the queue." % number_in_queue
)
return False

Expand All @@ -179,12 +179,12 @@ async def goto(self, ms: MessageSenderQueued, ctx: Interaction, number_in_queue:
tracks_removed = self.queue.goto(number_in_queue - 1)
if tracks_removed <= 0:
ms.add_message(
content=f"There is no element with the number {number_in_queue} in the queue"
content="There is no element at position %d in the queue" % number_in_queue
)
return False

# +1 for current track
ms.add_message(f"f{tracks_removed + 1} tracks has been skipped")
ms.add_message(f"{tracks_removed + 1} tracks has been skipped")
return True

def queue_list(self, ms: MessageSenderQueued, ctx: Interaction) -> bool:
Expand Down

0 comments on commit 4170f5d

Please sign in to comment.