chunky-dev / discord-bot

Friendly bot for the Chunky Discord server.
GNU Affero General Public License v3.0
2 stars 4 forks source link

Error with messages with multiple GH links. #31

Closed ThatRedox closed 1 year ago

ThatRedox commented 1 year ago
#1 #2

Spits out

INFO:bot:Message <number> with 2 GitHub issues.
Ignoring exception in on_message
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/site-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "/app/main.py", line 155, in on_message
    utils.generate_gh_embed_snippet(embed, issue, self._gh)
  File "/app/utils.py", line 120, in generate_gh_embed_snippet
    repo = gh.get_repo(f"{issue[0]}/{issue[1]}")
UnboundLocalError: local variable 'issue' referenced before assignment