Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,7 @@ When a user triggers the emergency command, the bot will mention all online/idle

* If no users in the log channel are online/idle, the cog will fall back to mentioning all non-bot users.
* No number of users greather than the value of the `maxmentions` setting will be mentioned. The order of mentions is not guaranteed, so who is/isn't mentioned under this condition may be unpredictable.
* Additionally, the user `tenou` (`232453105403428865`) will always be mentioned if they are a member of the server, hold the `moderators` role (`266919923903758336`), and were not already included in the initial selection (regardless of online status or the `maxmentions` limit).

#### Configuration Commands

Expand Down
12 changes: 12 additions & 0 deletions report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -269,6 +269,18 @@ async def send_emergency_report(self, log_channel: TextLikeChannel, embed: disco
mentions_to_use = mentions_to_use[:max_mentions]
logger.info(f"Limited mentions to configured maximum of {max_mentions}")

# Add the very special boy tenou because he's always on DND but still want's to get pinged
try:
tenou = log_channel.guild.get_member(232453105403428865)
if (
tenou is not None
and tenou.get_role(266919923903758336) is not None
and tenou.mention not in mentions_to_use
):
mentions_to_use.append(tenou.mention)
except Exception as e:
logger.error(f"Failed to check or add tenou to emergency mentions: {e}")

if not mentions_to_use:
logger.warning(f"Could not find any members to mention in emergency report for guild {log_channel.guild.name}")
# No mentions to send, just send the embed
Expand Down
Loading