Add logo
This commit is contained in:
parent
aa0e6dad31
commit
05fda00d99
6 changed files with 121 additions and 3 deletions
|
@ -6,3 +6,4 @@
|
|||
- of
|
||||
- user
|
||||
- ids
|
||||
logo: alligator2
|
||||
|
|
|
@ -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())
|
||||
|
|
|
@ -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))
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
103
jarvis/logo.py
Normal file
103
jarvis/logo.py
Normal file
|
@ -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
|
5
run.py
5
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:
|
||||
|
|
Loading…
Add table
Reference in a new issue