diff options
author | 2021-01-26 17:13:12 +0530 | |
---|---|---|
committer | 2021-01-26 17:13:12 +0530 | |
commit | 24f915bbe94452f80c7ab57b90b0f48d09e07e63 (patch) | |
tree | 572acfe6ecfd5ab40ce64d30aa4896cd40023873 /bot/exts/evergreen/issues.py | |
parent | Change 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.py | 6 |
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: |