From baa20503e716a9ed9ab8be5f82c3456c7b4cfbb5 Mon Sep 17 00:00:00 2001 From: PureFunctor Date: Sun, 14 Jun 2020 14:20:09 +0800 Subject: Add basic caesar cipher information embed --- bot/exts/evergreen/fun.py | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) (limited to 'bot/exts/evergreen/fun.py') 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: -- cgit v1.2.3