mirror of
https://gitlab.com/bignutty/labscore.git
synced 2025-06-07 21:53:07 -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,3 +1,4 @@
|
|||
const { PERMISSION_GROUPS } = require('#constants');
|
||||
const { AudioTranscribe } = require('#obelisk');
|
||||
|
||||
const { createEmbed } = require('#utils/embed')
|
||||
|
@ -5,9 +6,6 @@ const { codeblock, icon } = require('#utils/markdown');
|
|||
const { editOrReply } = require('#utils/message')
|
||||
const { STATICS } = require('#utils/statics');
|
||||
|
||||
// TODO: Turn this into a general purpose permissions constant
|
||||
const { Permissions } = require("detritus-client/lib/constants");
|
||||
|
||||
module.exports = {
|
||||
name: 'transcribe',
|
||||
aliases: ['tcr'],
|
||||
|
@ -18,7 +16,7 @@ module.exports = {
|
|||
usage: 'transcribe',
|
||||
slashCommand: "Transcribe Voice Message"
|
||||
},
|
||||
permissionsClient: [Permissions.EMBED_LINKS, Permissions.SEND_MESSAGES, Permissions.USE_EXTERNAL_EMOJIS, Permissions.READ_MESSAGE_HISTORY, Permissions.READ_MESSAGE_HISTORY],
|
||||
permissionsClient: [...PERMISSION_GROUPS.baseline],
|
||||
run: async (context) => {
|
||||
context.triggerTyping();
|
||||
if (!context.message.messageReference) return editOrReply(context, createEmbed("warning", context, "You need to reply to a voice message."))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue