aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts
diff options
context:
space:
mode:
authorGravatar PureFunctor <[email protected]>2020-06-14 14:20:09 +0800
committerGravatar PureFunctor <[email protected]>2020-06-26 01:50:17 +0800
commitbaa20503e716a9ed9ab8be5f82c3456c7b4cfbb5 (patch)
tree59996c5418c0e270e0e4ba8ad08d464baa59f7a6 /bot/exts
parentMake caesarcipher a command group (diff)
Add basic caesar cipher information embed
Diffstat (limited to 'bot/exts')
-rw-r--r--bot/exts/evergreen/fun.py13
1 files changed, 12 insertions, 1 deletions
diff --git a/bot/exts/evergreen/fun.py b/bot/exts/evergreen/fun.py
index 2b1abaa4..f3e3bfcc 100644
--- a/bot/exts/evergreen/fun.py
+++ b/bot/exts/evergreen/fun.py
@@ -1,4 +1,5 @@
import functools
+import json
import logging
import random
from typing import Callable, Tuple, Union
@@ -8,7 +9,7 @@ from discord.ext import commands
from discord.ext.commands import Bot, Cog, Context, MessageConverter
from bot import utils
-from bot.constants import Emojis
+from bot.constants import Colours, Emojis
log = logging.getLogger(__name__)
@@ -100,6 +101,16 @@ class Fun(Cog):
@caesarcipher_group.command(name="info")
async def caesarcipher_info(self, ctx: Context) -> None:
"""Information about the Caesar Cipher."""
+ with open("bot\\resources\\evergreen\\caesar_info.json", "r") as f:
+ data = json.load(f)
+
+ embed = Embed(
+ title=data["title"],
+ description="".join(data["description"]),
+ colour=Colours.dark_green,
+ )
+
+ await ctx.send(embed=embed)
@caesarcipher_group.command(name="translate")
async def caesarcipher_translate(self, ctx: Context, offset: int, *, text: str) -> None: