mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 14:13:02 -04:00
unify typing logic for a more consistent experience
This commit is contained in:
parent
d2aeecf70d
commit
1ca74d3c2c
67 changed files with 240 additions and 109 deletions
|
@ -30,7 +30,18 @@ module.exports.acknowledge = async function(context, incognito = false, permissi
|
|||
return await context.respond({data: { flags: MessageFlags.EPHEMERAL }, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE});
|
||||
}
|
||||
return await context.respond({data: {}, type: InteractionCallbackTypes.DEFERRED_CHANNEL_MESSAGE_WITH_SOURCE})
|
||||
}
|
||||
};
|
||||
|
||||
// Command Flow
|
||||
return await context.triggerTyping()
|
||||
|
||||
/**
|
||||
* This endpoint will sometimes error when
|
||||
* - Discord breaks their platform again
|
||||
* - Discord disables it via cloudflare to reduce
|
||||
* platform load.
|
||||
*
|
||||
* In order to avoid our bot from crashing, we catch the
|
||||
* error here.
|
||||
*/
|
||||
return await context.triggerTyping().catch((e)=>{})
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue