diff --git a/config.example.yaml b/config.example.yaml index 7cf7ec1..5276ff6 100644 --- a/config.example.yaml +++ b/config.example.yaml @@ -6,3 +6,4 @@ - of - user - ids + logo: alligator2 diff --git a/jarvis/__init__.py b/jarvis/__init__.py index f9cf227..2bbb544 100644 --- a/jarvis/__init__.py +++ b/jarvis/__init__.py @@ -7,6 +7,7 @@ import asyncio from jarvis.config import get_config from jarvis import utils +from jarvis import logo if asyncio.get_event_loop().is_closed(): asyncio.set_event_loop(asyncio.new_event_loop()) diff --git a/jarvis/cogs/util.py b/jarvis/cogs/util.py index 2a3ff96..ae16d9f 100644 --- a/jarvis/cogs/util.py +++ b/jarvis/cogs/util.py @@ -1,5 +1,5 @@ import jarvis -from jarvis import jarvis_self +from jarvis import jarvis_self, config, logo from jarvis.utils import convert_bytesize, build_embed from jarvis.utils.field import Field from discord.ext import commands @@ -8,6 +8,7 @@ from discord.ext import commands class UtilCog(commands.Cog): def __init__(self, bot): self.bot = bot + self.config = config.get_config() @commands.command(name="status", help="Retrieve J.A.R.V.I.S. status") async def _status(self, ctx): @@ -28,6 +29,11 @@ class UtilCog(commands.Cog): embed = build_embed(title, desc, fields, color) await ctx.send(embed=embed) + @commands.command(name="logo", help="Get the current logo") + async def _logo(self, ctx): + lo = logo.get_logo(self.config.logo) + await ctx.send(f"```\n{lo}\n```") + def setup(bot): bot.add_cog(UtilCog(bot)) diff --git a/jarvis/config.py b/jarvis/config.py index 76a438d..aef734f 100644 --- a/jarvis/config.py +++ b/jarvis/config.py @@ -12,11 +12,15 @@ class Config: token: str client_id: str admins: list + logo: str @classmethod def from_yaml(cls, y): instance = cls( - token=y["token"], client_id=y["client_id"], admins=y["admins"] + token=y["token"], + client_id=y["client_id"], + admins=y["admins"], + logo=y["logo"], ) return instance diff --git a/jarvis/logo.py b/jarvis/logo.py new file mode 100644 index 0000000..794f2e4 --- /dev/null +++ b/jarvis/logo.py @@ -0,0 +1,103 @@ +logo_doom = r""" + ___ ___ ______ _ _ _____ _____ + |_ | / _ \ | ___ \ | | | | |_ _| / ___| + | | / /_\ \ | |_/ / | | | | | | \ `--. + | | | _ | | / | | | | | | `--. \ +/\__/ / _ | | | | _ | |\ \ _ \ \_/ / _ _| |_ _ /\__/ / _ +\____/ (_)\_| |_/(_)\_| \_|(_) \___/ (_) \___/ (_)\____/ (_) + +""" + +logo_epic = r""" +_________ _______ _______ _________ _______ +\__ _/ ( ___ ) ( ____ ) |\ /| \__ __/ ( ____ \ + ) ( | ( ) | | ( )| | ) ( | ) ( | ( \/ + | | | (___) | | (____)| | | | | | | | (_____ + | | | ___ | | __) ( ( ) ) | | (_____ ) + | | | ( ) | | (\ ( \ \_/ / | | ) | +|\_) ) _ | ) ( | _ | ) \ \__ _ \ / _ ___) (___ _ /\____) | _ +(____/ (_)|/ \|(_)|/ \__/(_) \_/ (_)\_______/(_)\_______)(_) + +""" + +logo_ivrit = r""" + _ _ ____ __ __ ___ ____ + | | / \ | _ \ \ \ / / |_ _| / ___| + _ | | / _ \ | |_) | \ \ / / | | \___ \ + | |_| | _ / ___ \ _ | _ < _ \ V / _ | | _ ___) | _ + \___/ (_) /_/ \_\ (_) |_| \_\ (_) \_/ (_) |___| (_) |____/ (_) + +""" + +logo_kban = r""" + + '||' . | . '||''|. . '||' '|' . '||' . .|'''.| . + || ||| || || '|. .' || ||.. ' + || | || ||''|' || | || ''|||. + || .''''|. || |. ||| || . '|| +|| .|' .|. .||. .||. '|' | .||. |'....|' + ''' + +""" + +logo_larry3d = r""" + + _____ ______ ____ __ __ ______ ____ +/\___ \ /\ _ \ /\ _`\ /\ \/\ \ /\__ _\ /\ _`\ +\/__/\ \ \ \ \L\ \ \ \ \L\ \ \ \ \ \ \ \/_/\ \/ \ \,\L\_\ + _\ \ \ \ \ __ \ \ \ , / \ \ \ \ \ \ \ \ \/_\__ \ + /\ \_\ \ __ \ \ \/\ \ __ \ \ \\ \ __ \ \ \_/ \ __ \_\ \__ __ /\ \L\ \ __ + \ \____//\_\ \ \_\ \_\/\_\ \ \_\ \_\/\_\ \ `\___//\_\ /\_____\/\_\ \ `\____\/\_\ + \/___/ \/_/ \/_/\/_/\/_/ \/_/\/ /\/_/ `\/__/ \/_/ \/_____/\/_/ \/_____/\/_/ + +""" + +logo_slane = r""" + + __ ___ ____ _ __ ____ _____ + / / / | / __ \ | | / / / _/ / ___/ + __ / / / /| | / /_/ / | | / / / / \__ \ +/ /_/ / _ / ___ | _ / _, _/ _ | |/ / _ _/ / _ ___/ / _ +\____/ (_)/_/ |_|(_)/_/ |_| (_)|___/ (_)/___/ (_)/____/ (_) + +""" + +logo_standard = r""" + + _ _ ____ __ __ ___ ____ + | | / \ | _ \ \ \ / / |_ _| / ___| + _ | | / _ \ | |_) | \ \ / / | | \___ \ + | |_| | _ / ___ \ _ | _ < _ \ V / _ | | _ ___) | _ + \___/ (_) /_/ \_\ (_) |_| \_\ (_) \_/ (_) |___| (_) |____/ (_) + +""" + +logo_alligator = r""" + + ::::::::::: ::: ::::::::: ::: ::: ::::::::::: :::::::: + :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: + +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ + +#+ +#++:++#++: +#++:++#: +#+ +:+ +#+ +#++:++#++ + +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+# #+# #+# #+# #+# #+# #+# #+# #+# #+#+#+# #+# #+# #+# #+# #+# #+# +##### ### ### ### ### ### ### ### ### ### ########### ### ######## ### + +""" + +logo_alligator2 = r""" + +::::::::::: ::: ::::::::: ::: ::: ::::::::::: :::::::: + :+: :+: :+: :+: :+: :+: :+: :+: :+: :+: + +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ +:+ + +#+ +#++:++#++: +#++:++#: +#+ +:+ +#+ +#++:++#++ + +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+ +#+# #+# #+# #+# #+# #+# #+# #+# #+# #+#+#+# #+# #+# #+# #+# #+# #+# + ##### ### ### ### ### ### ### ### ### ### ########### ### ######## ### + +""" + + +def get_logo(lo): + if "logo_" not in lo: + lo = "logo_" + lo + return globals()[lo] if lo in globals() else logo_alligator2 diff --git a/run.py b/run.py index 0d042f9..bf3beb0 100644 --- a/run.py +++ b/run.py @@ -91,9 +91,12 @@ Command List: if __name__ == "__main__": freeze_support() + config = jarvis.config.get_config() pid_file = Value("i", 0) jarvis_process = Process(target=run, name="jarvis") - print("J.A.R.V.I.S. initializing....") + logo = jarvis.logo.get_logo(config.logo) + print(logo) + print("Initializing....") print(" Updating core systems...") status = update() if status == 0: