errbotio / err-backend-discord

Backend for Discord for Errbot
GNU General Public License v3.0
23 stars 21 forks source link

Multiple Responses #7

Closed btotharye closed 5 years ago

btotharye commented 7 years ago

So testing my err-mycroft plugin which uses regex I'm seeing multiple posts for some reason, its a Discord thing cause this doesn't happen in slack or mattermost:

image

Suggestions on where to look for this? It only happens in rooms, if I do it in a PM it works per expected.

gbin commented 7 years ago

This is strange, do you see the message coming in from the backend several times?

btotharye commented 7 years ago

Here is a sample:

14:56:42 DEBUG    errbot.core               *** text = how do I install mycroft
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'install.*mycroft|mycroft.*install.*' produced a match
14:56:42 DEBUG    errbot.plugins.ACLs       Check install_mycroft for ACLs.
14:56:42 INFO     errbot.plugins.ACLs       Matching ACL {} against username 332287565891633152 for command mycroft:install_mycroft
14:56:42 INFO     errbot.plugins.ACLs       Check if install_mycroft is admin only command.
14:56:42 INFO     errbot.core               Processing command 'install_mycroft' with parameters 'how do I install mycroft' from btotharye#2743@general
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'skill.*list|list.*skill.*' produced no match
14:56:42 DEBUG    errbot.flow               Test if the command install_mycroft is a trigger for an inflight flow ...
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'what.i.*mycroft|mycroft.*what.*' produced no match
14:56:42 DEBUG    errbot.flow               None matched.
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'doc.*picroft|picroft.*doc.*' produced no match
14:56:42 DEBUG    errbot.backends.discord   Threading is False
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'skill.*available|available.*skill.*' produced no match
14:56:42 DEBUG    errbot.backends.discord   Send:
The information for installing mycroft can be found here, https://docs.mycroft.ai/installing.and.running
to #general
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'wake.*word|wake.*word.*' produced no match
14:56:42 DEBUG    errbot.flow               Test if the command install_mycroft is a trigger for an inflight flow ...
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'hey|hi|hello' produced no match
14:56:42 DEBUG    errbot.flow               None matched.
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'install.*picroft|picroft.*install.*' produced no match
14:56:42 DEBUG    errbot.flow               Test if the command install_mycroft is an auto-trigger for any flow ...
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'image.*picroft|picroft.*image.*' produced no match
14:56:42 DEBUG    errbot.core               Matching 'how do I install mycroft' against 'doc.*mycroft|mycroft.*doc.*' produced no match
14:56:42 DEBUG    errbot.core               Triggering callback_message on Flows
14:56:42 DEBUG    errbot.core               Triggering callback_message on ACLs
14:56:42 DEBUG    errbot.core               Triggering callback_message on ChatRoom
14:56:42 DEBUG    errbot.core               Triggering callback_message on Backup
14:56:42 DEBUG    errbot.core               Triggering callback_message on Help
14:56:42 DEBUG    errbot.core               Triggering callback_message on CommandNotFoundFilter
14:56:42 DEBUG    errbot.core               Triggering callback_message on Health
14:56:42 DEBUG    errbot.core               Triggering callback_message on Plugins
14:56:42 DEBUG    errbot.core               Triggering callback_message on Utils
14:56:42 DEBUG    errbot.core               Triggering callback_message on VersionChecker
14:56:42 DEBUG    errbot.core               Triggering callback_message on mycroft
14:56:42 DEBUG    errbot.core               Triggering callback_message on Example

And I have a few times of this happening until I cntrl +c to kill the bot so it doesn't go crazy posting

gbin commented 7 years ago

Simply it cannot detects the message comes from itself?

On Sun, Sep 10, 2017 at 10:58 AM, Brian Hopkins notifications@github.com wrote:

Here is a sample:

14:56:42 DEBUG errbot.core ** text = how do I install mycroft 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'install.mycroft|mycroft.install.' produced a match 14:56:42 DEBUG errbot.plugins.ACLs Check install_mycroft for ACLs. 14:56:42 INFO errbot.plugins.ACLs Matching ACL {} against username 332287565891633152 for command mycroft:install_mycroft 14:56:42 INFO errbot.plugins.ACLs Check if install_mycroft is admin only command. 14:56:42 INFO errbot.core Processing command 'install_mycroft' with parameters 'how do I install mycroft' from btotharye#2743@general 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'skill.list|list.skill.' produced no match 14:56:42 DEBUG errbot.flow Test if the command install_mycroft is a trigger for an inflight flow ... 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'what.i.mycroft|mycroft.what.' produced no match 14:56:42 DEBUG errbot.flow None matched. 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'doc.picroft|picroft.doc.' produced no match 14:56:42 DEBUG errbot.backends.discord Threading is False 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'skill.available|available.skill.' produced no match 14:56:42 DEBUG errbot.backends.discord Send: The information for installing mycroft can be found here, https://docs.mycroft.ai/installing.and.running to #general 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'wake.word|wake.word.' produced no match 14:56:42 DEBUG errbot.flow Test if the command install_mycroft is a trigger for an inflight flow ... 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'hey|hi|hello' produced no match 14:56:42 DEBUG errbot.flow None matched. 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'install.picroft|picroft.install.' produced no match 14:56:42 DEBUG errbot.flow Test if the command install_mycroft is an auto-trigger for any flow ... 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'image.picroft|picroft.image.' produced no match 14:56:42 DEBUG errbot.core Matching 'how do I install mycroft' against 'doc.mycroft|mycroft.doc.' produced no match 14:56:42 DEBUG errbot.core Triggering callback_message on Flows 14:56:42 DEBUG errbot.core Triggering callback_message on ACLs 14:56:42 DEBUG errbot.core Triggering callback_message on ChatRoom 14:56:42 DEBUG errbot.core Triggering callback_message on Backup 14:56:42 DEBUG errbot.core Triggering callback_message on Help 14:56:42 DEBUG errbot.core Triggering callback_message on CommandNotFoundFilter 14:56:42 DEBUG errbot.core Triggering callback_message on Health 14:56:42 DEBUG errbot.core Triggering callback_message on Plugins 14:56:42 DEBUG errbot.core Triggering callback_message on Utils 14:56:42 DEBUG errbot.core Triggering callback_message on VersionChecker 14:56:42 DEBUG errbot.core Triggering callback_message on mycroft 14:56:42 DEBUG errbot.core Triggering callback_message on Example

And I have a few times of this happening until I cntrl +c to kill the bot so it doesn't go crazy posting

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/gbin/err-backend-discord/issues/7#issuecomment-328348080, or mute the thread https://github.com/notifications/unsubscribe-auth/AA7izP4JJ9zKdZKv33xHpydajXkDGX2xks5sg_j8gaJpZM4PSV5Q .

btotharye commented 7 years ago

Maybe, did you have that check in the plugin I haven't looked yet? Maybe we need to add a piece where it doesn't respond to itself for people that use regex

gbin commented 7 years ago

The backend should be responsible to filter them out, this is often something that comes back on a backend or another. One is that the bot needs to match itself (often from the config.py) to the frm identity from the incoming message. Sometimes it is not an obvious match.

btotharye commented 7 years ago

Ok well for now I updated my repo to not use regex and I'll see if I can look at what might be going on here

nzlosh commented 5 years ago

Closing this issue due to inactive. Please re-open it if you think it still needs to be addressed.