2021-04-25 21:33:35 +00:00
|
|
|
|
import royalnet.engineer as engi
|
|
|
|
|
import royalnet_telethon as rt
|
2021-04-30 13:30:27 +00:00
|
|
|
|
import royalnet_discordpy as rd
|
2021-04-25 21:33:35 +00:00
|
|
|
|
import pkg_resources
|
2021-04-30 13:22:58 +00:00
|
|
|
|
import royalpack.bolts as rb
|
2021-04-25 21:33:35 +00:00
|
|
|
|
|
|
|
|
|
|
2021-04-30 13:22:58 +00:00
|
|
|
|
@rb.capture_errors
|
2021-04-25 21:33:35 +00:00
|
|
|
|
@engi.TeleportingConversation
|
|
|
|
|
async def version(*, _imp: engi.PDAImplementation, _msg: engi.Message, **__):
|
|
|
|
|
"""
|
|
|
|
|
Controlla la versione attuale dei pacchetti di questo bot.
|
|
|
|
|
"""
|
|
|
|
|
|
|
|
|
|
# noinspection PyListCreation
|
|
|
|
|
msg = [
|
|
|
|
|
f"ℹ️ \uE01BVersioni\uE00B",
|
|
|
|
|
]
|
|
|
|
|
|
|
|
|
|
msg.append("")
|
|
|
|
|
msg.append(f"- \uE01Croyalnet\uE00C \uE01B{pkg_resources.get_distribution('royalnet').version}\uE00B")
|
|
|
|
|
|
|
|
|
|
if isinstance(_imp, rt.TelethonPDAImplementation):
|
|
|
|
|
msg.append(f"- \uE01Croyalnet_telethon\uE00C \uE01B{pkg_resources.get_distribution('royalnet_telethon').version}\uE00B")
|
2021-04-30 13:30:27 +00:00
|
|
|
|
elif isinstance(_imp, rd.DiscordpyPDAImplementation):
|
|
|
|
|
msg.append(f"- \uE01Croyalnet_discordpy\uE00C \uE01B{pkg_resources.get_distribution('royalnet_discordpy').version}\uE00B")
|
2021-04-25 21:33:35 +00:00
|
|
|
|
|
|
|
|
|
msg.append(f"- \uE01Croyalpack\uE00C \uE01B{pkg_resources.get_distribution('royalpack').version}\uE00B")
|
|
|
|
|
|
|
|
|
|
await _msg.reply(text="\n".join(msg))
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
__all__ = ("version",)
|