mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 06:03:04 -04:00
add permission checks to everything user-facing
This commit is contained in:
parent
9e9c53e1bd
commit
61274d6be5
66 changed files with 276 additions and 27 deletions
|
@ -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`
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue