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