Fixed temporary bans, and added an option to exclude discord from banning.

changed the color of "Time is UP!" in the roll results, as requested.
This commit is contained in:
2022-08-09 17:25:55 +02:00
parent 28f0e66394
commit 6b4cb275b3
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -110,7 +110,7 @@ class BanController(BaseModule):
f"SELECT b.*, COALESCE(p1.name, b.char_id) AS name, p2.name AS sender_name FROM ban_list b " f"SELECT b.*, COALESCE(p1.name, b.char_id) AS name, p2.name AS sender_name FROM ban_list b "
f"LEFT JOIN player p1 ON b.char_id = p1.char_id " f"LEFT JOIN player p1 ON b.char_id = p1.char_id "
f"LEFT JOIN player p2 ON b.sender_char_id = p2.char_id " f"LEFT JOIN player p2 ON b.sender_char_id = p2.char_id "
f"WHERE ended_early < 1 AND (finished_at < ?) " f"WHERE ended_early < 1 AND (finished_at < ? AND finished_at > 0) "
f"ORDER BY b.created_at DESC", [time.time()]) f"ORDER BY b.created_at DESC", [time.time()])
for active in d: for active in d:
@@ -44,7 +44,7 @@ class DiscordCommandHandler(BaseModule):
def pre_start(self): def pre_start(self):
self.command_service.register_command_channel("Discord", self.DISCORD_CHANNEL) self.command_service.register_command_channel("Discord", self.DISCORD_CHANNEL)
self.setting_service.register(self.module_name, "include_discord_ban", True, BooleanSettingType(), self.setting_service.register(self.module_name, "include_discord_ban", True, BooleanSettingType(),
"Should chatbot bans be extended to discord (Ban from the discord server!):") "Should chatbot bans be extended to discord (Ban from the discord server!)")
@event("discord_command", "should the bot take care of discord commands", False) @event("discord_command", "should the bot take care of discord commands", False)
def discord_command_handler(self, _, event_data): def discord_command_handler(self, _, event_data):