channel has a .send method which sends a message to a channel. You don't have to worry about where the object comes from, but to see an example client.on('message',..) in index.js.
Should resolve true/false depending on whether the notification was a success or failure.
If you encapsulate this in a single file, put this in bot/components/notifier.js.
Component responsible for sending messages back to a channel.
The function should roughly be defined as follows:
const notify(channel, message)
where
channel
is a TextChannel object from the Discord library.channel
has a.send
method which sends a message to a channel. You don't have to worry about where the object comes from, but to see an exampleclient.on('message',..)
inindex.js
.Should resolve true/false depending on whether the notification was a success or failure.
If you encapsulate this in a single file, put this in
bot/components/notifier.js
.