Added afk/brb
Timer messages ("Timer XX has yyy left") now get resumed after a bot restart
Alliance relay is discord compatible now. [Orgbot]
This commit is contained in:
@@ -108,7 +108,7 @@ class DiscordController:
|
||||
|
||||
def pre_start(self):
|
||||
self.setting_service.register(self.module_name, "discord_token", "", HiddenSettingType(allow_empty=True),
|
||||
"Enter your Discord token here")
|
||||
"Enter your Discord token here")
|
||||
|
||||
def get_name(self, discord_id):
|
||||
data = self.db.query_single(
|
||||
@@ -584,6 +584,7 @@ class DiscordController:
|
||||
return
|
||||
channel: TextChannel = msg.channel
|
||||
if channel.id == int(self.setting_service.get_value("dc_relay_public")):
|
||||
|
||||
if self.setting_service.get_value('is_alliance_bot') == "0":
|
||||
response = f"[<notice>{html.escape(msg.author.nick if msg.author.nick else msg.author.name, False)}" \
|
||||
f"</notice>]: " \
|
||||
@@ -592,7 +593,8 @@ class DiscordController:
|
||||
response = f"{html.escape(msg.author.nick if msg.author.nick else msg.author.name, False)}: " \
|
||||
f"{html.escape(emojis.decode(msg.clean_content), False)}"
|
||||
await msg.delete(delay=3600)
|
||||
self.relay_hub_service.send_message("public_relay", [msg.author.nick, msg.author], response, response)
|
||||
sender = self.db.query_single("SELECT * from account a left join player p on a.main = p.char_id where a.discord_id = ?", [msg.author.id])
|
||||
self.relay_hub_service.send_message("public_relay", sender, html.escape(emojis.decode(msg.clean_content), False), response)
|
||||
|
||||
if self.is_command(msg.content):
|
||||
admin = self.get_role("Administrator", self.guild.roles)
|
||||
|
||||
Reference in New Issue
Block a user