From 1c5f65410f1f6e0ba4b0c3ebd23a7cf0e32fe95b Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Wed, 29 Apr 2020 23:54:01 +0200 Subject: [PATCH] Add royalpack command --- royalpack/commands/__init__.py | 2 ++ royalpack/commands/royalpack.py | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 royalpack/commands/royalpack.py diff --git a/royalpack/commands/__init__.py b/royalpack/commands/__init__.py index ecf3b565..215e19e9 100644 --- a/royalpack/commands/__init__.py +++ b/royalpack/commands/__init__.py @@ -53,6 +53,7 @@ from .lazyfunkwhalealbum import LazyfunkwhalealbumCommand from .matchmaking import MatchmakingCommand from .cvstats import CvstatsCommand from .elevatormusic import ElevatormusicCommand +from .royalpack import RoyalpackCommand # Enter the commands of your Pack here! available_commands = [ @@ -110,6 +111,7 @@ available_commands = [ MatchmakingCommand, CvstatsCommand, ElevatormusicCommand, + RoyalpackCommand, ] # Don't change this, it should automatically generate __all__ diff --git a/royalpack/commands/royalpack.py b/royalpack/commands/royalpack.py new file mode 100644 index 00000000..512206db --- /dev/null +++ b/royalpack/commands/royalpack.py @@ -0,0 +1,20 @@ +from typing import * +import royalnet.commands as rc +from ..version import semantic + + +class RoyalpackCommand(rc.Command): + name: str = "royalpack" + + description: str = "Visualizza la versione attuale di Royalpack." + + syntax: str = "" + + async def run(self, args: rc.CommandArgs, data: rc.CommandData) -> None: + if __debug__: + message = f"ℹ️ Royalpack [url=https://github.com/Steffo99/royalpack/]Unreleased[/url]\n" + else: + message = f"ℹ️ Royalpack [url=https://github.com/Steffo99/royalpack/releases/tag/{semantic}]{semantic}[/url]\n" + if "69" in semantic: + message += "(Nice.)" + await data.reply(message)