* Upgrade discord.js to 12.2.0
* Use cache accessors in Discord client
* Replace sendMessage with send
* Use avatarURL method
* Update test stubs for discord.js 12
* Disconnect clients at end of tests
* Fix disabling webhook mentions when bot lacks permissions
* Consistently use this.bot in tests
Some tests were subtly testing broken behavior,
as this.addUser was not correctly adding a user
to the given bot's guild.
* Group up webhook tests in contexts
* Fix webhooks for users with no avatars
Fixes#529.
* Fix avatars not displaying via webhooks
Avatars that were 2048x2048 would break webhooks displaying avatars, defaulting to 128x128 fixes that.
* travis-ci fix
* Fix null-checks
* Fix travis-ci tests for avatar size
* Add ircPreventMention
(This adds a zero-width character to nicknames to prevent IRC-side pings.)
Original commits:
- Add ircPreventMention code
- Document ircPreventMention
- Make ircNickColor wrap the displayUsername
- Fix build errors
- Default ircPreventMention to false
* Correct that ircPreventMention is off by default
* Test ircPreventMention
Only tests turning it on; extant tests ensure it's off by default.
Adds a format option for a default avatar URL to send if the user isn't found on IRC. Takes the user's nickname as an argument so it can be passed to a web service.
Fixes#383.
Discord already has permissions for whether the bot can ping everyone,
and the webhook send method has a `disableEveryone` option, so let's
defer to the inbuilt Discord permission for this.
When permissions can't be found (shouldn't happen), defaults to
disabling the pings.
Fixes#494
(Fixes #384.)
On the Discord side of things, animated emoji get a prefixed 'a' to the
identifier string, so that instead of the normal emoji string:
`<:test:330064465703862273>`
you instead get:
`<a:test:330064465703862273>`
This commit fixes parseText to also process the animated form into `:test:`.
* I think this should work?
* Added test for multi-character command prefixes
(accidentally pushed to wrong branch there but let's hope no one notices)
* Fixed bot test. That looks better.
When an IRC user uses a custom emoji reference (e.g.
:testemoji:), it should be translated into the actual
emoji for Discord users, instead of appearing in plain
text.
This also adds tests to ensure other emoji-like phrases
do not get converted or cause the bot to crash.
The irc module does not appear to be very actively maintained, and has
quite a few issues causing issues in this project itself.
This fork, maintained by me, has a few fixes to some major issues
already.
Changelogs:
- v0.6.0 - https://github.com/Throne3d/node-irc/releases/tag/v0.6.0
- v0.6.1 - https://github.com/Throne3d/node-irc/releases/tag/v0.6.1
Should fix#199, #200, as well as some issues not previously noted
(crash if unbanning a user who is not banned, crash in circumstances
with a poor internet connection).
It may also allow us to remove our workaround for the quit and nick
events having all channels in the associated array.
Fixes#217.
- Reorganize the comments describing how to format the custom
formatting options
- Make 'author' and 'nickname' synonyms in the custom formatting
- Add a 'side' parameter for commandPrelude (takes 'Discord' or
'IRC', depending on whether the message was from Discord or IRC)
- Add debug messages upon sending command messages
- Add similar functionality for command messages sent in IRC to
Discord, as from Discord to IRC
- Add tests for the above and custom formatting of it
- Do not discard reason from part messages
- Output to each channel in the quit messages
- Add tests for join/part/quit events
- Add test that sendSpecialToDiscord doesn't send messages
to outside the channel mapping