aboutsummaryrefslogtreecommitdiffstats
path: root/bot
diff options
context:
space:
mode:
Diffstat (limited to 'bot')
-rw-r--r--bot/exts/evergreen/fun.py10
1 files changed, 8 insertions, 2 deletions
diff --git a/bot/exts/evergreen/fun.py b/bot/exts/evergreen/fun.py
index 75b0e2b0..364ce74b 100644
--- a/bot/exts/evergreen/fun.py
+++ b/bot/exts/evergreen/fun.py
@@ -154,7 +154,10 @@ class Fun(Cog):
Also accepts a valid Discord Message ID or link.
"""
- await self._caesar_cipher(ctx, offset, text)
+ if offset < 0:
+ await ctx.send(":no_entry: Cannot use a negative offset.")
+ else:
+ await self._caesar_cipher(ctx, offset, text)
@caesarcipher_group.command(name="decrypt", aliases=("leftshift", "lshift"))
async def caesarcipher_decrypt(self, ctx: Context, offset: int, *, text: str) -> None:
@@ -165,7 +168,10 @@ class Fun(Cog):
Also accepts a valid Discord Message ID or link.
"""
- await self._caesar_cipher(ctx, -offset, text)
+ if offset < 0:
+ await ctx.send(":no_entry: Cannot use a negative offset.")
+ else:
+ await self._caesar_cipher(ctx, -offset, text)
@staticmethod
async def _get_text_and_embed(ctx: Context, text: str) -> Tuple[str, Union[Embed, None]]: