diff --git a/royalnet/__init__.py b/royalnet/__init__.py index bae560c9..e11a8ec5 100644 --- a/royalnet/__init__.py +++ b/royalnet/__init__.py @@ -1,5 +1,5 @@ from . import audio, bots, commands, database, network, utils, error, web -version = "5.0a26" +version = "5.0a27" __all__ = ["audio", "bots", "commands", "database", "network", "utils", "error", "web"] diff --git a/royalnet/commands/__init__.py b/royalnet/commands/__init__.py index 4dcb2dd3..03346716 100644 --- a/royalnet/commands/__init__.py +++ b/royalnet/commands/__init__.py @@ -27,10 +27,11 @@ from .missing import MissingCommand from .cv import CvCommand from .pause import PauseCommand from .queue import QueueCommand +from .royalnetprofile import RoyalnetprofileCommand __all__ = ["NullCommand", "PingCommand", "ShipCommand", "SmecdsCommand", "CiaoruoziCommand", "ColorCommand", "SyncCommand", "DiarioCommand", "RageCommand", "DateparserCommand", "AuthorCommand", "ReminderCommand", "KvactiveCommand", "KvCommand", "KvrollCommand", "VideoinfoCommand", "SummonCommand", "PlayCommand", "SkipCommand", "PlaymodeCommand", "VideochannelCommand", "MissingCommand", "CvCommand", "PauseCommand", - "QueueCommand"] + "QueueCommand", "RoyalnetprofileCommand"] diff --git a/royalnet/commands/author.py b/royalnet/commands/author.py index 188ec55f..f4e8fd07 100644 --- a/royalnet/commands/author.py +++ b/royalnet/commands/author.py @@ -1,5 +1,5 @@ from ..utils import Command, Call -from ..database.tables import Royal, Telegram +from ..database.tables import Royal, Telegram, Discord class AuthorCommand(Command): @@ -8,11 +8,12 @@ class AuthorCommand(Command): command_description = "Ottieni informazioni sull'autore di questa chiamata." command_syntax = "" - require_alchemy_tables = {Royal, Telegram} + require_alchemy_tables = {Royal, Telegram, Discord} @classmethod async def common(cls, call: Call): author = await call.get_author() if author is None: await call.reply(f"โ˜๏ธ L'autore di questa chiamata รจ sconosciuto.") + return await call.reply(f"๐ŸŒž {str(author)} รจ l'autore di questa chiamata.") diff --git a/royalnet/commands/royalnetprofile.py b/royalnet/commands/royalnetprofile.py new file mode 100644 index 00000000..93191f90 --- /dev/null +++ b/royalnet/commands/royalnetprofile.py @@ -0,0 +1,18 @@ +import asyncio +from ..utils import Command, Call +from ..error import InvalidInputError + + +class RoyalnetprofileCommand(Command): + + command_name = "royalnetprofile" + command_description = "Invia in chat il link al tuo profilo Royalnet!" + command_syntax = "" + + @classmethod + async def common(cls, call: Call): + author = await call.get_author() + if author is None: + await call.reply("โš ๏ธ Devi essere registrato a Royalnet per usare questo comando!") + return + await call.reply(f"๐Ÿ”— https://ryg.steffo.eu/profile/{author.username}")