aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar ks123 <[email protected]>2020-03-29 08:55:22 +0300
committerGravatar ks123 <[email protected]>2020-03-29 08:55:22 +0300
commit317b5db5585ae72adf112508165fc6e161792948 (patch)
tree4f4f5dca5df321ba3650d1e2cbe2ce00e6463812
parent(PEP Command): Fixed comment of explanation of PEP 0 different processing. (diff)
(PEP Command): Moved icon URL to constant instead hard-coded string.
-rw-r--r--bot/cogs/utils.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/bot/cogs/utils.py b/bot/cogs/utils.py
index f35ff0f03..d15edd0a0 100644
--- a/bot/cogs/utils.py
+++ b/bot/cogs/utils.py
@@ -48,6 +48,8 @@ PEP0_INFO = {
}
PEP0_LINK = "https://www.python.org/dev/peps/"
+ICON_URL = "https://www.python.org/static/opengraph-icon-200x200.png"
+
class Utils(Cog):
"""A selection of utilities which don't have a clear category."""
@@ -74,7 +76,7 @@ class Utils(Cog):
title=f"**PEP 0 - {PEP0_TITLE}**",
description=f"[Link]({PEP0_LINK})"
)
- pep_embed.set_thumbnail(url="https://www.python.org/static/opengraph-icon-200x200.png")
+ pep_embed.set_thumbnail(url=ICON_URL)
for field, value in PEP0_INFO.items():
pep_embed.add_field(name=field, value=value)
@@ -104,7 +106,7 @@ class Utils(Cog):
description=f"[Link]({self.base_pep_url}{pep_number:04})",
)
- pep_embed.set_thumbnail(url="https://www.python.org/static/opengraph-icon-200x200.png")
+ pep_embed.set_thumbnail(url=ICON_URL)
# Add the interesting information
fields_to_check = ("Status", "Python-Version", "Created", "Type")