Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot get the webhook functionality to work #400

Closed
redfellow opened this issue May 14, 2018 · 8 comments
Closed

Cannot get the webhook functionality to work #400

redfellow opened this issue May 14, 2018 · 8 comments

Comments

@redfellow
Copy link

redfellow commented May 14, 2018

Commit:

  • b252f566582d9be953ea0dfd710afa1120f8bee6

Config:

[
    {
        "nickname": "<redacted>",
        "server": "<redacted>", 
        "discordToken": "<redacted>",
        "channelMapping": {
            "#<redacted-channelname1>": "#<redacted-channelname1>"
        },
        "ircOptions": {
            "encoding": "utf-8"
        },
        "format": {
            "ircText": "[{$displayUsername}] {$text}",
            "urlAttachment": "[{$displayUsername}] {$attachmentURL}",
            "discord": "**<{$author}>** {$withMentions}"
        },
        "ircNickColor": false,
        "ircStatusNotices": false,
        "webhooks": {
            "#<redacted-channelname1>": "https://discordapp.com/api/webhooks/<redacted>/<redacted>"
        }
    }
]

Screenshot:

  • test proof

Steps:

  • Create webhook, set the channel in the webhook setting to the same as in bot config
  • Launch bot with the config above. Rename with /nick in Discord and IRC to identical name.

Conclusion:

  • Webhook doesn't seem to work.
@djtyral
Copy link

djtyral commented May 16, 2018

I set this up the other day, and webhook seems to work fine (I'm using cloned, not installed from npm repositories), potentially an issue due to the - at the end of your name?

@redfellow
Copy link
Author

redfellow commented May 16, 2018

I now tested with a different nick name without special characters, same result. I'll test the clone method on the weekend.

@djtyral
Copy link

djtyral commented May 16, 2018

So, I don't write or claim to know how js works. I'm a shell script man myself. However looking over the bot.js from #230 it looks like it might be due to the bot seeing more than 1 user with the same username? I'm not entirely sure. I've checked to see if there's any sort of logging that the bot does and there isn't, which would be useful in cases like this, esp. if you could enable/disable at launch with a flag.

I really enjoy the premise and functionality of this bot, even if the administration and debugging features are lacking. Maybe I should learn some js.

@redfellow
Copy link
Author

I tested this on a 12 person channel using red- and redtest nicknames (both with /nick command). Unsure if the bot requires the irc nick to match to the first part of the actual red#3333 Discord user ID.

@djtyral
Copy link

djtyral commented May 16, 2018

It might, I know someone is having a similar issue Fiaxhs#1 but it's been since January. It's super weird it's not working for you though :/

@brad-anderson
Copy link

Not working for me either. I installed from npm but it says the version matches the latest version tag here on github.

@djtyral
Copy link

djtyral commented May 16, 2018

So I did a little testing this morning on my own. It looks like the IRC nick has to match the username for discord, not the channel nick. Pardon the potato quality on the snip, haven't had coffee yet

image

My "nick" in that discord is tyrl, because tyral causes my terminal to ding repeatedly while I'm in discord, but it still pulls my avatar, and I think it's because it sees my discord username.

@Fiaxhs might be able to shed more light on it if they're still working on it, but it looks like it's working "as intended."

@redfellow
Copy link
Author

Using latest commit from this repo, the functionality doesn't work, but after I installed via npm it works properly. It's matching against the set /nick as well.

Matching /nicks - https://i.imgur.com/UCMIQOJ.png
No match - https://vgy.me/1Cb2Ua.png

I'm unsure what causes this, but for all intents and purposes, my problem is solved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants