diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-21 00:05:53 -0400 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-10-21 00:05:53 -0400 |
commit | 166d7fdf24440db71311c2cda95697c06e7b8b36 (patch) | |
tree | 23b0400362b5f3035b156200eb634d202aa54741 /src/commands/utilities/viewraw.ts | |
parent | 08f33f7d450c8920afc3b9fb8886729547065313 (diff) | |
download | tanzanite-166d7fdf24440db71311c2cda95697c06e7b8b36.tar.gz tanzanite-166d7fdf24440db71311c2cda95697c06e7b8b36.tar.bz2 tanzanite-166d7fdf24440db71311c2cda95697c06e7b8b36.zip |
Refactoring, rewrote ButtonPaginator, better permission handling + support for send messages in threads, optimizations, another scam link
Diffstat (limited to 'src/commands/utilities/viewraw.ts')
-rw-r--r-- | src/commands/utilities/viewraw.ts | 38 |
1 files changed, 33 insertions, 5 deletions
diff --git a/src/commands/utilities/viewraw.ts b/src/commands/utilities/viewraw.ts index bd185d4..b7017c6 100644 --- a/src/commands/utilities/viewraw.ts +++ b/src/commands/utilities/viewraw.ts @@ -3,11 +3,9 @@ import { BushCommand, BushMessage, BushSlashMessage } from '../../lib'; export default class ViewRawCommand extends BushCommand { public constructor() { - super('viewraw', { - aliases: ['viewraw'], + super('view-raw', { + aliases: ['view-raw', 'vr'], category: 'utilities', - clientPermissions: ['EMBED_LINKS'], - channel: 'guild', description: { usage: 'viewraw <message id> <channel>', examples: ['viewraw 322862723090219008'], @@ -42,7 +40,37 @@ export default class ViewRawCommand extends BushCommand { match: 'flag', flag: '--js' } - ] + ], + slash: true, + slashOptions: [ + { + name: 'message', + description: 'What message would you like to view?', + type: 'STRING', + required: true + }, + { + name: 'channel', + description: 'What channel is the message in?', + type: 'CHANNEL', + required: false + }, + { + name: 'json', + description: 'Would you like to view the raw JSON message data?', + type: 'BOOLEAN', + required: false + }, + { + name: 'js', + description: 'Would you like to view the raw message data?', + type: 'BOOLEAN', + required: false + } + ], + channel: 'guild', + clientPermissions: (m) => util.clientSendAndPermCheck(m, ['EMBED_LINKS'], true), + userPermissions: [] }); } |