mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-10 23:23:08 -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
|
@ -4,6 +4,8 @@ const { editOrReply } = require("../../../labscore/utils/message");
|
|||
const superagent = require('superagent');
|
||||
const { getRecentImage } = require("../../../labscore/utils/attachment");
|
||||
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
name: 'anime',
|
||||
label: 'query',
|
||||
|
@ -20,6 +22,7 @@ module.exports = {
|
|||
limit: 1,
|
||||
duration: 5000
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.ATTACH_FILES],
|
||||
run: async (context, args) => {
|
||||
if(!context.channel.nsfw) return editOrReply(context, {embeds:[createEmbed("nsfw", context)]})
|
||||
if(args.query.length == 0) return editOrReply(context, {embeds:[createEmbed("warning", context, "Missing prompt")]})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue