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({
|
||||
intents: [GatewayIntentBits.DirectMessages],
|
||||
rest: {
|
||||
timeout: 4_000, // 4s
|
||||
timeout: 60_000, // 60s
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@ -90,7 +90,7 @@ exports.handler = async function(context, event, callback) {
|
||||
console.log(
|
||||
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);
|
||||
} else {
|
||||
console.log(
|
||||
@ -113,7 +113,7 @@ exports.handler = async function(context, event, callback) {
|
||||
console.log(
|
||||
invokeId, "GracefulFallbackPromise: I was the fastest, so I will attempt to notify discord users before resolving with a call"
|
||||
);
|
||||
await notifyAllDiscord(
|
||||
notifyAllDiscord(
|
||||
context,
|
||||
config,
|
||||
`📞 Somebody buzzed the door and it dialed through to fallback phone numbers @ Door "${config.door}"`,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user