aboutsummaryrefslogtreecommitdiffstats
path: root/bot/exts/evergreen/issues.py
diff options
context:
space:
mode:
authorGravatar Shivansh-007 <[email protected]>2021-01-26 17:13:12 +0530
committerGravatar Shivansh-007 <[email protected]>2021-01-26 17:13:12 +0530
commit24f915bbe94452f80c7ab57b90b0f48d09e07e63 (patch)
tree572acfe6ecfd5ab40ce64d30aa4896cd40023873 /bot/exts/evergreen/issues.py
parentChange PYDIS_REPOS to PYTHON_DISCORD_REPOS (diff)
Make the python_discord_repos' orgranisation name configurable
Diffstat (limited to 'bot/exts/evergreen/issues.py')
-rw-r--r--bot/exts/evergreen/issues.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/bot/exts/evergreen/issues.py b/bot/exts/evergreen/issues.py
index 95187551..d816770c 100644
--- a/bot/exts/evergreen/issues.py
+++ b/bot/exts/evergreen/issues.py
@@ -17,7 +17,7 @@ BAD_RESPONSE = {
}
MAX_REQUESTS = 10
REQUEST_HEADERS = dict()
-PYTHON_DISCORD_REPOS = "https://api.github.com/orgs/python-discord/repos"
+PYTHON_DISCORD_REPOS = "https://api.github.com/orgs/{repo}/repos"
if GITHUB_TOKEN := Tokens.github:
REQUEST_HEADERS["Authorization"] = f"token {GITHUB_TOKEN}"
@@ -34,7 +34,7 @@ class Issues(commands.Cog):
@tasks.loop(minutes=30)
async def get_pydis_repos(self) -> None:
"""Get all python-discord repositories on github."""
- async with self.bot.http_session.get(PYTHON_DISCORD_REPOS) as resp:
+ async with self.bot.http_session.get(PYTHON_DISCORD_REPOS.format(repo="python-discord")) as resp:
if resp.status == 200:
data = await resp.json()
for repo in data:
@@ -155,7 +155,7 @@ class Issues(commands.Cog):
elif isinstance(result, str):
await ctx.send(result)
-
+
@commands.Cog.listener()
@override_in_channel(WHITELISTED_CHANNELS + (Channels.dev_contrib, Channels.dev_branding))
async def on_message(self, message: discord.Message) -> None: