Skip to content

Commit 0370854

Browse files
committed
2 parents 9efdee1 + b531998 commit 0370854

File tree

3 files changed

+8
-0
lines changed

3 files changed

+8
-0
lines changed

config/settings.yml.example

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ BOT_INFO:
66
DEV_PREFIX: "~" # You can enable dev mode in .env
77
BOT_NAME: "Tux" # This may not apply everywhere, WIP (Best to keep it as Tux for now). Help command will be changed to be less Tux-specific if you change this.
88
BOT_VERSION: "git" # vX.Y.Z or git
9+
HIDE_BOT_OWNER: false # Hide bot owner and sysadmin from help command
910
# Available substitutions:
1011
# {member_count} - total member count of all guilds
1112
# {guild_count} - total guild count

tux/help.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,6 +268,12 @@ async def _add_bot_help_fields(self, embed: discord.Embed) -> None:
268268
value="[Help contribute! View Repo](https://github.com/allthingslinux/tux)",
269269
inline=True,
270270
)
271+
embed.add_field(
272+
name="Bot Info",
273+
value=f"""Running {"Tux" if CONFIG.BOT_NAME == "Tux" else CONFIG.BOT_NAME + "(Tux)"} version {CONFIG.BOT_VERSION} in {"Development" if CONFIG.DEV else "Production"} mode.
274+
{f"This tux instance is administrated by <@{CONFIG.BOT_OWNER_ID}>" if not CONFIG.HIDE_BOT_OWNER and CONFIG.BOT_OWNER_ID else ""}""",
275+
inline=False,
276+
)
271277

272278
async def send_cog_help(self, cog: commands.Cog) -> None:
273279
"""Sends a help message for a specific cog."""

tux/utils/config.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,7 @@ class Config:
3434
BOT_NAME: Final[str] = config["BOT_INFO"]["BOT_NAME"]
3535
BOT_VERSION: Final[str] = config["BOT_INFO"]["BOT_VERSION"]
3636
ACTIVITIES: Final[str] = config["BOT_INFO"]["ACTIVITIES"]
37+
HIDE_BOT_OWNER: Final[bool] = config["BOT_INFO"]["HIDE_BOT_OWNER"]
3738

3839
# Debug env
3940
DEBUG: Final[bool] = bool(os.getenv("DEBUG", "True"))

0 commit comments

Comments
 (0)