mirror of
https://github.com/wlinator/luminara.git
synced 2024-10-02 20:43:12 +00:00
chore: Update image URL validation in boost module configuration commands
This commit is contained in:
parent
b68a8f1177
commit
33ef6732ca
2 changed files with 2 additions and 1 deletions
|
@ -38,6 +38,7 @@ class Constants:
|
|||
|
||||
# config
|
||||
CONFIG_GUIDE_URL = "https://wiki.wlinator.org/serverconfig"
|
||||
ALLOWED_IMAGE_EXTENSIONS = (".jpg", ".png")
|
||||
|
||||
# emotes
|
||||
EMOTES_GUILD_ID = 1038051105642401812
|
||||
|
|
|
@ -72,7 +72,7 @@ async def set_boost_image(ctx, image_url: str | None):
|
|||
guild_config.boost_image_url = None
|
||||
guild_config.push()
|
||||
image_url = None
|
||||
elif not image_url.endswith((".jpg", ".png")):
|
||||
elif not image_url.endswith(CONST.ALLOWED_IMAGE_EXTENSIONS):
|
||||
raise LumiException(CONST.STRINGS["error_boost_image_url_invalid"])
|
||||
elif not image_url.startswith(("http://", "https://")):
|
||||
raise LumiException(CONST.STRINGS["error_image_url_invalid"])
|
||||
|
|
Loading…
Reference in a new issue