fix null discord notify path
This commit is contained in:
parent
321ace5b4a
commit
3f7233698a
@ -1,5 +1,5 @@
|
||||
function jsonMsgSuffix(jsonString) {
|
||||
if (jsonString === undefined) {
|
||||
if (!jsonString) {
|
||||
return "";
|
||||
}
|
||||
try {
|
||||
@ -23,7 +23,9 @@ exports.handler = async function(context, event, callback) {
|
||||
try {
|
||||
users = JSON.parse(users);
|
||||
msgs = JSON.parse(msgs);
|
||||
console.log("before parsing", jsons);
|
||||
jsons = JSON.parse(jsons);
|
||||
console.log("after parsing", jsons);
|
||||
|
||||
promises = msgs.map((msg, i) =>
|
||||
discord.sendMessageToUser(
|
||||
|
||||
@ -93,7 +93,7 @@ exports.handler = async function(context, event, callback) {
|
||||
msg + u + ')'
|
||||
);
|
||||
|
||||
await notifyDiscord(context, msgs, config.discordUsers, []);
|
||||
await notifyDiscord(context, msgs, config.discordUsers, config.discordUsers.map(() => undefined));
|
||||
|
||||
let discordLock = false;
|
||||
let intervals = [];
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user