From 1f2b60364d04ad8e1a21a9ee8b33704a1845f12d Mon Sep 17 00:00:00 2001 From: Numerlor <25886452+Numerlor@users.noreply.github.com> Date: Wed, 8 Dec 2021 16:14:50 +0100 Subject: Use hardcoded rules url instead of constructing it from consts Discord does validation on the embed url which may fail for valid local urls --- bot/exts/info/information.py | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/bot/exts/info/information.py b/bot/exts/info/information.py index a5e700678..fa22a4fe9 100644 --- a/bot/exts/info/information.py +++ b/bot/exts/info/information.py @@ -13,7 +13,6 @@ from discord.utils import escape_markdown from bot import constants from bot.api import ResponseCodeError from bot.bot import Bot -from bot.constants import URLs from bot.converters import MemberOrUser from bot.decorators import in_whitelist from bot.errors import NonExistentRoleError @@ -528,14 +527,14 @@ class Information(Cog): @command(aliases=("rule",)) async def rules(self, ctx: Context, rules: Greedy[int]) -> None: """Provides a link to all rules or, if specified, displays specific rule(s).""" - rules_embed = Embed(title="Rules", color=Colour.og_blurple(), url=f"{URLs.site_schema}{URLs.site}/pages/rules") + rules_embed = Embed(title="Rules", color=Colour.og_blurple(), url="https://www.pythondiscord.com/pages/rules") if not rules: # Rules were not submitted. Return the default description. rules_embed.description = ( - f"The rules and guidelines that apply to this community can be found on" - f" our [rules page]({URLs.site_schema}{URLs.site}/pages/rules). We expect" - f" all members of the community to have read and understood these." + "The rules and guidelines that apply to this community can be found on" + " our [rules page](https://www.pythondiscord.com/pages/rules). We expect" + " all members of the community to have read and understood these." ) await ctx.send(embed=rules_embed) -- cgit v1.2.3