diff options
author | 2020-09-21 23:19:50 +0200 | |
---|---|---|
committer | 2020-09-21 23:53:00 +0200 | |
commit | 13ef604bd43a5eae4b1b3ade8670ceca1fc4592a (patch) | |
tree | fbcf03cda2f89dbaf3907bc302082278b0cdb640 | |
parent | Remove modlog from unload blacklist (diff) |
Move bot repo URL constant and delete avatar URL
- Avatar URL can be accessed through bot.user.avatar_url and won't need to be a constant
- Bot repo URL fits better under the Client named tuple
- URLs class removed, since it was no longer used
-rw-r--r-- | bot/constants.py | 6 | ||||
-rw-r--r-- | bot/exts/utils/extensions.py | 6 |
2 files changed, 4 insertions, 8 deletions
diff --git a/bot/constants.py b/bot/constants.py index e7d4265e..c69d5a83 100644 --- a/bot/constants.py +++ b/bot/constants.py @@ -85,6 +85,7 @@ class Client(NamedTuple): token = environ.get("SEASONALBOT_TOKEN") sentry_dsn = environ.get("SEASONALBOT_SENTRY_DSN") debug = environ.get("SEASONALBOT_DEBUG", "").lower() == "true" + github_bot_repo = "https://github.com/python-discord/bot" # Override seasonal locks: 1 (January) to 12 (December) month_override = int(environ["MONTH_OVERRIDE"]) if "MONTH_OVERRIDE" in environ else None @@ -186,11 +187,6 @@ class Roles(NamedTuple): core_developers = 587606783669829632 -class URLs: - bot_avatar = "https://raw.githubusercontent.com/discord-python/branding/master/logos/logo_circle/logo_circle.png" - github_bot_repo = "https://github.com/python-discord/bot" - - class Tokens(NamedTuple): giphy = environ.get("GIPHY_TOKEN") aoc_session_cookie = environ.get("AOC_SESSION_COOKIE") diff --git a/bot/exts/utils/extensions.py b/bot/exts/utils/extensions.py index 834b7d4f..65dfef84 100644 --- a/bot/exts/utils/extensions.py +++ b/bot/exts/utils/extensions.py @@ -9,7 +9,7 @@ from discord.ext.commands import Context, group from bot import exts from bot.bot import SeasonalBot as Bot -from bot.constants import Emojis, MODERATION_ROLES, Roles, URLs +from bot.constants import Client, Emojis, MODERATION_ROLES, Roles from bot.utils.checks import with_role_check from bot.utils.extensions import EXTENSIONS, unqualify from bot.utils.pagination import LinePaginator @@ -154,8 +154,8 @@ class Extensions(commands.Cog): embed = Embed(colour=Colour.blurple()) embed.set_author( name="Extensions List", - url=URLs.github_bot_repo, - icon_url=URLs.bot_avatar + url=Client.github_bot_repo, + icon_url=str(Bot.user.avatar_url) ) lines = [] |