mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-17 10:27:05 -04:00
- properly handle permissions for user commands
- add central permission group constant
This commit is contained in:
parent
dcb823a0a1
commit
d2aeecf70d
100 changed files with 245 additions and 942 deletions
|
@ -1,13 +1,11 @@
|
|||
const { rule34 } = require('#api');
|
||||
const { paginator } = require('#client');
|
||||
const { PERMISSION_GROUPS } = require('#constants');
|
||||
|
||||
const { createEmbed, formatPaginationEmbeds, page } = require('#utils/embed')
|
||||
const { pill } = require('#utils/markdown')
|
||||
const { editOrReply } = require('#utils/message')
|
||||
|
||||
// TODO: Turn this into a general purpose permissions constant
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
function createRule34Page(context, result) {
|
||||
let res = page(createEmbed("default", context, {
|
||||
description: '',
|
||||
|
@ -55,7 +53,7 @@ module.exports = {
|
|||
args: [
|
||||
{ name: 'site', default: 'rule34', type: 'string', help: `Site to search on \` ${Object.keys(SITES).join(', ')} \`` }
|
||||
],
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY],
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline],
|
||||
run: async (context, args) => {
|
||||
context.triggerTyping();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue