diff --git a/modules/onlinebot/ding/ding_controller.py b/modules/onlinebot/ding/ding_controller.py
index 6990561..e11ec5b 100644
--- a/modules/onlinebot/ding/ding_controller.py
+++ b/modules/onlinebot/ding/ding_controller.py
@@ -113,7 +113,7 @@ class DingController:
blob = self.text.format_page('Info',
f"
"
f"This automated message has been sent to you by:
"
- f"Igncom [{sys}]
"
+ f"{self.bot.get_char_name()} [{sys}]
"
f"Reason for this Message: "
f"You dinged {level}
"
f"Have you joined The Alliance Discord yet? "
diff --git a/modules/raidbot/raid/raidbot_controller.py b/modules/raidbot/raid/raidbot_controller.py
index a697aad..fcc7f3b 100644
--- a/modules/raidbot/raid/raidbot_controller.py
+++ b/modules/raidbot/raid/raidbot_controller.py
@@ -101,7 +101,7 @@ class RaidbotController(BaseModule):
blob += f"Raidleader: " \
f"" \
f"{self.leader.leader.name if self.leader.leader else 'not set - use !leader set'}" \
- f""
+ f"\n"
blob += f"Started At: {self.util.format_datetime(self.raid.started_at)} " \
f"({self.util.time_to_readable(t - self.raid.started_at)} ago)\n"
if self.raid.is_open:
@@ -483,21 +483,21 @@ class RaidbotController(BaseModule):
blob += f"End time: {self.util.format_datetime(log_entry[0].raid_end)}\n"
blob += f"Run time: " \
f"{self.util.time_to_readable(log_entry[0].raid_end - log_entry[0].raid_start)}\n"
- blob += f"Total points: {pts_sum:d}\n\n"
+ blob += f"Total points: {pts_sum}\n\n"
if char and log_entry_spec:
raider_name = self.character_service.resolve_char_to_name(log_entry_spec.raider_id)
main_info = self.account_service.get_main(log_entry_spec.raider_id)
- alt_link = "Alt of %s" % main_info.name if main_info.char_id != log_entry_spec.raider_id else "Alts"
- alt_link = self.text.make_chatcmd(alt_link, "/tell alts %s" % main_info.name)
- blob += "Log entry for %s\n" % raider_name
- blob += "Raider: %s [%s]\n" % (raider_name, alt_link)
+ alt_link = f"Alt of {main_info.name}" if main_info.char_id != log_entry_spec.raider_id else "Alts"
+ alt_link = self.text.make_chatcmd(alt_link, f"/tell alts {main_info.name}")
+ blob += f"Log entry for {raider_name}\n"
+ blob += f"Raider: {raider_name} [{alt_link}]\n"
blob += "Left raid: %s\n" % ("n/a"
if log_entry_spec.left_raid is None
else self.util.format_datetime(log_entry_spec.left_raid))
blob += "Was kicked: %s\n" % ("No"
if log_entry_spec.was_kicked is None
- else "Yes [%s]" % (self.util.format_datetime(log_entry_spec.was_kicked)))
+ else f"Yes [{self.util.format_datetime(log_entry_spec.was_kicked)}]")
blob += "Kick reason: %s\n\n" % ("n/a"
if log_entry_spec.was_kicked_reason is None
else log_entry_spec.was_kicked_reason)
@@ -569,9 +569,9 @@ class RaidbotController(BaseModule):
def announce_raid(self, event_type, event_data):
if self.raid:
if self.raid.is_open:
- self.bot.send_private_channel_message("Raid Running "
- ":: %s :: %s" %
- (self.raid.desc,
+ self.bot.send_private_channel_message(f"Raid Running "
+ f":: {self.raid.desc} :: %s" %
+ (
f""
f"{self.get_raid_join_blob('Click to Join')}"
f""))
@@ -587,6 +587,7 @@ class RaidbotController(BaseModule):
self.bot.send_private_channel_message(f":: No Leader set :: "
f"use !leader set")
return
- if not self.is_in_raid(leader.char_id):
+ account = self.account_service.get_account(leader.char_id)
+ if not self.is_in_raid(account.main):
self.bot.send_private_channel_message(f":: Raidleader {leader.name} "
f"is not in raid ::")
diff --git a/modules/standard/loot/auction_strategy/auction_strategy.py b/modules/standard/loot/auction_strategy/auction_strategy.py
index e173fdc..104a578 100644
--- a/modules/standard/loot/auction_strategy/auction_strategy.py
+++ b/modules/standard/loot/auction_strategy/auction_strategy.py
@@ -110,13 +110,9 @@ class AuctionStrategy:
raider: Raider = self.raid_controller.is_in_raid(main)
if type(raider) == Raider:
if not raider.is_active:
- self.bot.send_mass_message(request.sender.char_id,
- "You are not participating in the raid, and cannot add to the loot.")
- return
+ return "You are not participating in the raid, and cannot add to the loot."
elif raider is None:
- self.bot.send_mass_message(request.sender.char_id,
- "You are not participating in the raid, and cannot add to the loot.")
- return
+ return "You are not participating in the raid, and cannot add to the loot."
if not account:
return "You do not have an active account with this bot."
elif account.disabled:
diff --git a/modules/standard/loot/loot_controller.py b/modules/standard/loot/loot_controller.py
index 71f1d7b..d43d9a3 100644
--- a/modules/standard/loot/loot_controller.py
+++ b/modules/standard/loot/loot_controller.py
@@ -49,6 +49,7 @@ class LootController:
self.alias.add_alias("flatroll", "loot roll")
self.alias.add_alias("result", "loot roll")
self.alias.add_alias("results", "loot roll")
+ self.alias.add_alias("list", "loot")
self.alias.add_alias("win", "loot roll")
@command(command="loot", params=[], description="Show the list of added items", access_level="member")
@@ -292,9 +293,9 @@ class LootController:
for item in items:
self.add_item_to_loot(item, item.comment, item.multiloot)
- self.bot.send_private_channel_message("%s table was added to loot." % category)
+ self.bot.send_private_channel_message(f"{category} table was added to loot.")
else:
- return "%s does not have any items registered in loot table." % category
+ return f"{category} does not have any items registered in loot table."
@command(command="loot",
params=[Const("additem", is_optional=True), Int("item"), Int("item_count", is_optional=True)],
@@ -308,7 +309,7 @@ class LootController:
item = self.items_controller.get_by_item_id(item_id)
if not item:
- return "Could not find item with ID %d." % item_id
+ return f"Could not find item with ID {item_id}."
self.add_item_to_loot(item, item_count=item_count)
@@ -337,7 +338,7 @@ class LootController:
loot += item
self.add_item_to_loot(item, item_count=item_count)
- self.bot.send_private_channel_message("%s was added to loot list." % loot)
+ self.bot.send_private_channel_message(f"{loot} was added to loot list.")
@timerevent(budatime="1h",
description="Periodically check when loot list was last modified, and clear it "
@@ -384,10 +385,10 @@ class LootController:
[item[0][2], item[0][3]])
if imgid is not None:
img = self.text.make_image(imgid.get("icon")) + " - "
- blob += "%d. %s%s " % (i, img, item[0][0])
+ blob += f"{i:d}. {img}{item[0][0]} "
else:
- blob += "%d. %s " % (i, loot_item.get_item_str())
+ blob += f"{i:d}. {loot_item.get_item_str()} "
blob += f"x{loot_item.count} [{self.text.make_chatcmd('Add', f'/tell loot add {i}')}]\n"
blob += " └ "
if edit:
diff --git a/modules/standard/notes/notes_controller.py b/modules/standard/notes/notes_controller.py
index c8dedb1..25c65b8 100644
--- a/modules/standard/notes/notes_controller.py
+++ b/modules/standard/notes/notes_controller.py
@@ -33,11 +33,11 @@ class NotesController:
cnt += alt_cnt
if alt_cnt:
- blob += "\n%s\n" % alt.name
+ blob += f"\n{alt.name}\n"
for row in data:
- blob += "%s %s\n\n" % (row.note, self.text.make_tellcmd("Remove", "notes remove %d" % row.id))
+ blob += f"» {row.note} {self.text.make_tellcmd('Remove', f'notes remove {row.id:d}')}\n"
- return ChatBlob("Notes for %s (%d)" % (alts[0].name, cnt), blob)
+ return ChatBlob(f"Notes for {alts[0].name} ({cnt:d})", blob)
@command(command="notes", params=[Const("add"), Any("note")], access_level="member",
description="Add a note")
@@ -56,7 +56,7 @@ class NotesController:
[note_id])
if not note:
- return f"Could not find note with ID {note_id:d}."
+ return f"Could not find note with ID {note_id}."
if self.account_service.get_main(request.sender.char_id).char_id \
!= self.account_service.get_main(note.char_id).char_id:
@@ -64,4 +64,4 @@ class NotesController:
self.db.exec("DELETE FROM notes WHERE id = ?", [note_id])
- return f"Note with ID {note_id:d} deleted successfully."
+ return f"Note with ID {note_id} deleted successfully."
diff --git a/modules/standard/online/online_controller.py b/modules/standard/online/online_controller.py
index 49f4461..a981c59 100644
--- a/modules/standard/online/online_controller.py
+++ b/modules/standard/online/online_controller.py
@@ -121,15 +121,16 @@ class OnlineController:
params = [self.bot.name, self.bot.get_char_id()]
if not option:
option = "prof"
-
+ output = ""
if option == "prof":
- return self.online_display.count_prof(query, params, filters)
+ output = self.online_display.count_prof(query, params, filters)
elif option == "org":
- return self.online_display.count_org(query, params, filters)
+ output = self.online_display.count_org(query, params, filters)
elif option == "tl":
if filters:
try:
filters = int(filters)
except ValueError:
return f"Invalid Title level: {filters}"
- return self.online_display.count_tl(query, params, filters)
+ output = self.online_display.count_tl(query, params, filters)
+ return output if output != "" else "Nobody is in my private channel, sorry..."