mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-08 22:23:03 -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
|
@ -6,6 +6,8 @@ const { STATICS } = require('../../../labscore/utils/statics')
|
|||
const { paginator } = require('../../../labscore/client');
|
||||
const { reddit } = require('../../../labscore/api');
|
||||
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
function createRedditPage(context, result){
|
||||
let res = {
|
||||
"embeds": [
|
||||
|
@ -56,6 +58,7 @@ module.exports = {
|
|||
args: [
|
||||
{ default: "all", name: "type", type: "image", help: "Types of post the search query should return" }
|
||||
],
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS],
|
||||
run: async (context, args) => {
|
||||
context.triggerTyping();
|
||||
if(!args.query) return editOrReply(context, {embeds:[createEmbed("warning", context, `Missing Parameter (query).`)]})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue