Drop admin permissions correctly

This commit is contained in:
Cadence Ember 2024-07-15 15:27:21 +12:00
commit 8c506ed270
2 changed files with 5 additions and 3 deletions

View file

@ -103,10 +103,10 @@ function isWebhookMessage(message) {
/**
* Ephemeral messages can be generated if a slash command is attached to the same bot that OOYE is running on
* @param {DiscordTypes.APIMessage} message
* @param {Pick<DiscordTypes.APIMessage, "flags">} message
*/
function isEphemeralMessage(message) {
return message.flags & (1 << 6);
return message.flags && (message.flags & (1 << 6));
}
/** @param {string} snowflake */