MLH-Fellowship / Auto-Tagger

To automatically tag people in various chat groups
Apache License 2.0
4 stars 3 forks source link

Discord bot bugs #20

Closed CallmeMehdi closed 4 years ago

CallmeMehdi commented 4 years ago

When executing the following command on discord: $tag How are you Mehdi Mabrouki?

I get the following error:

$tag How are you Mehdi Mabrouki?
Ignoring exception in on_message
Traceback (most recent call last):
  File "/home/mehdi/.local/lib/python3.7/site-packages/discord/client.py", line 333, in _run_event
    await coro(*args, **kwargs)
  File "discord_bot.py", line 68, in on_message
    member_id = str(name_ids[all_words[i].lower()])
KeyError: 'mehdi'

@pncnmnp I wonder if you updated the discord_bot.py script code with the one you have locally

pncnmnp commented 4 years ago

@CallmeMehdi Is this from the master branch?

pncnmnp commented 4 years ago

@CallmeMehdi, I tried running the discord_bot.py file from three branches - master, dev, and discord. It ran successfully in all of them. Can you confirm if you are facing this issue with the latest commit - https://github.com/MLH-Fellowship/Auto-Tagger/commit/88fa8d4bf88ce73231b83602fa47fc218eae971f

pncnmnp commented 4 years ago

@CallmeMehdi Can you send the following details to reproduce this issue:

CallmeMehdi commented 4 years ago

This bug is fixed with PR 21! Please update your branch with master for it to be fixed!