-
Notifications
You must be signed in to change notification settings - Fork 292
Closes #299 #301
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
Closes #299 #301
Conversation
Thanks! Do you want to try to add a test for it too? It should probably look something like this: https://github.com/xbony2/discord-irc/blob/5c927a5e1080d73e5fa7de075b436010bc704573/test/bot.test.js#L461-L481 it('should support multi-character command prefixes', function () {
const bot = new Bot({ ...config, commandCharacters: ['@@'] });
const text = '@@test command';
const message = {
content: text,
mentions: { users: [] },
channel: {
name: 'discord'
},
author: {
username: 'test',
id: 'not bot id'
},
guild: this.guild
};
this.bot.sendToIRC(message);
ClientStub.prototype.say.getCall(0).args.should.deep.equal([
'#irc', 'Command sent from Discord by test:'
]);
ClientStub.prototype.say.getCall(1).args.should.deep.equal(['#irc', text]);
}); |
After modifying |
(accidentally pushed to wrong branch there but let's hope no one notices)
@xbony2 It looks like you need to remove the trailing spaces on line 810 (here) and also use Thanks! |
@Throne3d yeah, npm pointed it out to me. Thanks. |
(With help from @ekmartin :P I cannot JavaScript)