Skip to content

Commit f0daa8f

Browse files
committed
style(app.py): update logger warning messages for clarity and conciseness
Improve the clarity and conciseness of logger warning messages regarding the use of eval commands by sysadmins. The updated messages use emojis to quickly convey the nature of the warning and direct users to the settings.yml.example file for more detailed information. This change aims to make the warnings more user-friendly and informative.
1 parent bf8365c commit f0daa8f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

tux/app.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -106,15 +106,15 @@ async def start(self) -> None:
106106
return
107107

108108
owner_ids = {CONFIG.BOT_OWNER_ID}
109+
109110
if CONFIG.ALLOW_SYSADMINS_EVAL:
110111
logger.warning(
111-
"Sysadmins are allowed to use eval commands. This can be potentially dangerous if you have not fully read the comments about this in settings.yml.",
112+
"⚠️ Eval is enabled for sysadmins, this is potentially dangerous; see settings.yml.example for more info.",
112113
)
113114
owner_ids.update(CONFIG.SYSADMIN_IDS)
115+
114116
else:
115-
logger.warning(
116-
"Sysadmins are not allowed to use eval commands. Read settings.yml for more info on this. You can safely ignore this warning if you are not a sysadmin.",
117-
)
117+
logger.warning("🔒️ Eval is disabled for sysadmins; see settings.yml.example for more info.")
118118

119119
self.bot = Tux(
120120
command_prefix=get_prefix,

0 commit comments

Comments
 (0)