Initial Release of IGNCore version 2.5

This commit is contained in:
2021-08-09 13:18:56 +02:00
commit a83d98c47e
910 changed files with 224171 additions and 0 deletions
+22
View File
@@ -0,0 +1,22 @@
from core.command_param_types import Any
from core.decorators import instance, command
from core.tyrbot import Tyrbot
@instance()
class ChatController:
def inject(self, registry):
self.command_alias_service = registry.get_instance("command_alias_service")
self.bot: Tyrbot = registry.get_instance("bot")
def start(self):
self.command_alias_service.add_alias("cmd", "shout")
self.command_alias_service.add_alias("s", "shout")
@command(command="shout", params=[Any("message")], access_level="leader",
description="Show a highly visible message")
def shout_command(self, _, message):
self.bot.send_private_channel_message(f"<br><notice> .:: Raid Command ::.</notice>\n"
f"<yellow>────────────────</yellow>\n"
f"<highlight>{message}</highlight>\n"
f"<yellow>────────────────</yellow>")