More verbosity...
This commit is contained in:
parent
ae3c53ac6f
commit
2fe077592a
7
index.js
7
index.js
|
@ -10,4 +10,9 @@ log("Starting up notifiers...")
|
||||||
const enabledNotifiers = Object.keys(settings.notifiers).filter(notifier => settings.notifiers[notifier].enabled)
|
const enabledNotifiers = Object.keys(settings.notifiers).filter(notifier => settings.notifiers[notifier].enabled)
|
||||||
const notifiers = await Promise.all(enabledNotifiers.map(notifier => getNotifier(notifier)))
|
const notifiers = await Promise.all(enabledNotifiers.map(notifier => getNotifier(notifier)))
|
||||||
|
|
||||||
notifiers.forEach(notifier => notifier("Started up 'maintenance-bot'..."))
|
log("Starting up checkers...")
|
||||||
|
|
||||||
|
log("Sending out start-up messages...")
|
||||||
|
notifiers.forEach(notifier => notifier("Started up 'maintenance-bot'..."))
|
||||||
|
|
||||||
|
log("Start up complete!")
|
|
@ -11,7 +11,7 @@ export async function start() {
|
||||||
|
|
||||||
async function sendMessage(msg) {
|
async function sendMessage(msg) {
|
||||||
const receivers = await Promise.all(settings.notifiers.discord.receivers.map(id => client.users.fetch(id)))
|
const receivers = await Promise.all(settings.notifiers.discord.receivers.map(id => client.users.fetch(id)))
|
||||||
log("Sending messages to:", receivers.map(e => e.tag))
|
log("Sending messages to:", receivers.map(e => e.tag), "\nMessage:", msg)
|
||||||
receivers.forEach(async receiver => {
|
receivers.forEach(async receiver => {
|
||||||
await receiver.createDM()
|
await receiver.createDM()
|
||||||
await receiver.send(msg)
|
await receiver.send(msg)
|
||||||
|
|
|
@ -19,7 +19,7 @@ export async function start() {
|
||||||
|
|
||||||
async function sendMessage(msg) {
|
async function sendMessage(msg) {
|
||||||
const receivers = settings.notifiers.xmpp.receivers
|
const receivers = settings.notifiers.xmpp.receivers
|
||||||
log("Sending messages to:", receivers)
|
log("Sending messages to:", receivers, "\nMessage:", msg)
|
||||||
const stanzas = receivers.map(
|
const stanzas = receivers.map(
|
||||||
address => xml(
|
address => xml(
|
||||||
"message",
|
"message",
|
||||||
|
|
Loading…
Reference in New Issue
Block a user