From d3d81582cd7005df16fe3f5306e6afbed75bdb74 Mon Sep 17 00:00:00 2001 From: Joe Banks Date: Sat, 17 Jul 2021 20:10:11 +0100 Subject: Initial commit --- arthur/utils.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 arthur/utils.py (limited to 'arthur/utils.py') diff --git a/arthur/utils.py b/arthur/utils.py new file mode 100644 index 0000000..ce2d356 --- /dev/null +++ b/arthur/utils.py @@ -0,0 +1,13 @@ +"""Utility functionality for King Arthur.""" + +from discord import Embed +from discord.colour import Colour + + +def generate_error_embed(title: str = "Failed!", description: str = "An error occurred") -> Embed: + """Generate an error embed to return to Discord.""" + return Embed( + title=title, + description=description, + colour=Colour.red() + ) -- cgit v1.2.3