Changed the string formatter from % to f"",

Fixed a bug related to logging [log dir does not exist on master, and needs to get created on first startup]
Added !prefadmin <user> to view preferences of players, and change them
Orgrank & name will be hidden in !alts, if the character is not in an org
Page prefix & suffix are now being relayed [for example, it affects !online
Fixed !perks
Added comments regarding external API's.
This commit is contained in:
2021-08-14 02:36:20 +02:00
parent 80b5a4b577
commit 46d0ba3634
19 changed files with 104 additions and 86 deletions
+9 -11
View File
@@ -1,7 +1,5 @@
import sys
import time
from conf.config import BotConfig
from core.command_alias_service import CommandAliasService
from core.decorators import instance, command, event
from core.dict_object import DictObject
@@ -17,18 +15,18 @@ from modules.standard.datanet.ws_controller import WebsocketRelayController
@instance()
class WorldBossController:
# Timers are provided through an local websocket relay, which gets fed by an external API;
# If you intend to take advantage of this module,
# you **will** need to contact the API host of your choice to whitelist
# The IP Addresses with which you intend to access the API.
# example timer data:
# [{"name":"Tarasque","time": <mortal time>},
# {"name":"Vizaresh","time": <mortal time>}]
timer_data = []
alerts = [480 * 60, 360 * 60, 240 * 60, 120 * 60, 60 * 60, 60 * 15,
60 * 5, 60 * 3, 60 * 2, 60, 30, 15, 10, 5, 4, 3, 2, 1, 0]
jobs = []
timer_data = []
def __init__(self):
mod = __import__(f'conf.{sys.argv[1]}', fromlist=['BotConfig'])
config: BotConfig = getattr(mod, 'BotConfig')
if hasattr(config, "timer_url"):
self.timer_api = config.timer_url
else:
self.timer_api = None
def inject(self, registry):
self.logger = Logger(__name__)
+2 -2
View File
@@ -57,6 +57,6 @@ class PerksController:
if row.perk_name != current_perk:
blob += f"\n<header2>{row.perk_name} {row.max_perk_level}</header2>\n"
current_perk = row.perk_name
blob += f"{row.skill} <highlight>{row.buff_amount:d}</highlight>\n"
blob += f"{row.skill} <highlight>{row.buff_amount}</highlight>\n"
return ChatBlob(f"Buff Perks for {level:d} {prof}", blob)
return ChatBlob(f"Buff Perks for {level} {prof}", blob)