add permission checks to everything user-facing

This commit is contained in:
derpystuff 2023-06-15 12:09:40 +02:00
parent 9e9c53e1bd
commit 61274d6be5
66 changed files with 276 additions and 27 deletions

View file

@ -51,6 +51,15 @@ const embedTypes = Object.freeze({
color: COLORS.error
}
},
"errordetail": (context) => {
return {
author: {
iconUrl: STATIC_ICONS.error,
name: `Error`
},
color: COLORS.error
}
},
"nsfw": (context) => {
return {
author: {
@ -82,6 +91,12 @@ module.exports.createEmbed = function(type, context, content){
emb.author.name = content
return emb
}
if(["errordetail"].includes(type)){
emb.author.name = content.error
emb.description = content.content
return emb
}
if(content && content.footer && !content.footer.iconUrl) content.footer.iconUrl = `https://cdn.discordapp.com/avatars/${context.application.id}/${context.application.icon}.png?size=256`