don't block on discord
This commit is contained in:
parent
29a839aef8
commit
99d0353af3
@ -11,7 +11,7 @@ exports.getDiscordClient = async (context) => {
|
|||||||
const client = new Client({
|
const client = new Client({
|
||||||
intents: [GatewayIntentBits.DirectMessages],
|
intents: [GatewayIntentBits.DirectMessages],
|
||||||
rest: {
|
rest: {
|
||||||
timeout: 4_000, // 4s
|
timeout: 60_000, // 60s
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@ -90,7 +90,7 @@ exports.handler = async function(context, event, callback) {
|
|||||||
console.log(
|
console.log(
|
||||||
invokeId, "UnlockPromise: I was the fastest, so I will attempt to notify discord users before resolving with unlock"
|
invokeId, "UnlockPromise: I was the fastest, so I will attempt to notify discord users before resolving with unlock"
|
||||||
);
|
);
|
||||||
await notifyAllDiscord(context, config, `🔓 Doorman buzzed someone up @ Door "${config.door}"`, JSON.stringify(body.fingerprint));
|
notifyAllDiscord(context, config, `🔓 Doorman buzzed someone up @ Door "${config.door}"`, JSON.stringify(body.fingerprint));
|
||||||
resolve(twiml);
|
resolve(twiml);
|
||||||
} else {
|
} else {
|
||||||
console.log(
|
console.log(
|
||||||
@ -113,7 +113,7 @@ exports.handler = async function(context, event, callback) {
|
|||||||
console.log(
|
console.log(
|
||||||
invokeId, "GracefulFallbackPromise: I was the fastest, so I will attempt to notify discord users before resolving with a call"
|
invokeId, "GracefulFallbackPromise: I was the fastest, so I will attempt to notify discord users before resolving with a call"
|
||||||
);
|
);
|
||||||
await notifyAllDiscord(
|
notifyAllDiscord(
|
||||||
context,
|
context,
|
||||||
config,
|
config,
|
||||||
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`,
|
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`,
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user