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

Customize author's nick in webhook #572

Open
DarthGandalf opened this issue Nov 19, 2020 · 1 comment
Open

Customize author's nick in webhook #572

DarthGandalf opened this issue Nov 19, 2020 · 1 comment

Comments

@DarthGandalf
Copy link

DarthGandalf commented Nov 19, 2020

E.g. make it ... (via IRC) to make it clear where the message comes from instead of just saying "Bot"

The "format.discord" option from config isn't used in the webhook mode, from what I can see in

discord-irc/lib/bot.js

Lines 597 to 602 in e0f2edf

const username = _.padEnd(author.substring(0, USERNAME_MAX_LENGTH), USERNAME_MIN_LENGTH, '_');
webhook.client.send(withMentions, {
username,
avatarURL,
disableMentions: canPingEveryone ? 'none' : 'everyone',
}).catch(logger.error);

In the non-webhook case I could make the bot's nick to be "IRC", so it's not the problem there

@Throne3d
Copy link
Collaborator

Throne3d commented Dec 5, 2020

I don't believe we can change the "Bot" tag – that comes from Discord. You're right, though, that we don't use the format.discord option from the config with webhooks. I think it'd be best to make a new config, format.webhookName, if we were to introduce this, as format.discord is used to format whole messages (not just usernames) when it's applied.

This project is mostly in maintenance-only mode, so I won't be implementing this myself, but I'll mark it with a "new feature" and "help wanted" tag in case anyone wants to take it up. With an especially complete PR (including tests), I could merge a change to add this!

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

No branches or pull requests

2 participants