diff options
| author | 2021-01-26 17:07:48 +0530 | |
|---|---|---|
| committer | 2021-01-26 17:07:48 +0530 | |
| commit | d973c1266b93a5baeb32a2f04ed797b8d0f0cd1b (patch) | |
| tree | ec78124dfd789e95a842aa85360b86c7ea4a958f | |
| parent | Use list.extend while appending issue links (diff) | |
Change PYDIS_REPOS to PYTHON_DISCORD_REPOS
Diffstat (limited to '')
| -rw-r--r-- | bot/exts/evergreen/issues.py | 7 | 
1 files changed, 4 insertions, 3 deletions
| diff --git a/bot/exts/evergreen/issues.py b/bot/exts/evergreen/issues.py index 724be737..95187551 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() -PYDIS_REPOS = "https://api.github.com/orgs/python-discord/repos" +PYTHON_DISCORD_REPOS = "https://api.github.com/orgs/python-discord/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(PYDIS_REPOS) as resp: +        async with self.bot.http_session.get(PYTHON_DISCORD_REPOS) as resp:              if resp.status == 200:                  data = await resp.json()                  for repo in data: @@ -155,8 +155,9 @@ 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:          """Command to retrieve issue(s) from a GitHub repository using automatic linking if matching <repo>#<issue>."""          message_repo_issue_map = re.findall(fr".+?({self.repo_regex})#(\d+)", message.content) | 
