Skip to content

Commit 6757786

Browse files
Add ternary conditions
1 parent 74ed920 commit 6757786

1 file changed

Lines changed: 3 additions & 9 deletions

File tree

bot/decorators.py

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -172,15 +172,9 @@ async def inner(self: Cog, ctx: Context, *args, **kwargs) -> None:
172172

173173
msg = ""
174174

175-
if ping_user:
176-
msg += f"{ctx.author.mention}, "
177-
178-
msg += "Here's the output of "
179-
180-
if paste_link:
181-
msg += f"[your command]({paste_link}):"
182-
else:
183-
msg += "your command:"
175+
msg = "Here's the output of "
176+
msg += f"[your command]({paste_link})" if paste_link else "your command"
177+
msg += f", {ctx.author.mention}:" if ping_user else ":"
184178

185179
await ctx.send(msg)
186180

0 commit comments

Comments
 (0)