* 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
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.
As the irc library can change the nick of the bot when
connecting (e.g. because the nick is currently taken, by
some other user), `this.nickname` may not correspond to the
current nickname and so when receiving a join event upon
joining a channel (prior to the names event), the current
guard against this can pass despite it being an event for
the bot.
This modifies it to check against ircClient.nick where
relevant, and also modifies the test stubs to allow adding
the nickname to the config and exposing this functionality
in tests.
To see the failure before this patch, enable
`ircStatusNotices` and run two copies of the bot; the
second should crash upon joining a channel, as it will have
a modified nickname (e.g. 'testbot1').
Attempts to fix#216's crash but is unlikely to fix the
underlying issue (that somehow the client isn't saving
a list of nicks in a channel, either because the server
isn't sending a names event, or the node-irc library is
processing it poorly, or otherwise).
Should fix#216, by lowercasing the channel name when
it receives each event. This also adds debug messages
to make it easier to see when the bot is actually
receiving (and presumably processing) these events.
Keep a list of users in each channel, using the names event
in addition to the join/part events, so as to prevent spamming
unnecessary channels when the quit event is raised with all
channels from a server.
Fixes#213.
- 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