aboutsummaryrefslogtreecommitdiff
path: root/src/commands/dev/sh.ts
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 18:13:05 -0500
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2022-01-23 18:13:05 -0500
commita3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a (patch)
tree9b0f8ed8a93c22c90512751e3f2f5937e1925760 /src/commands/dev/sh.ts
parent5557677f1570eb564a30cfcebb6030235dc84d47 (diff)
downloadtanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.gz
tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.tar.bz2
tanzanite-a3f8d3884a1deca5eccfb6d990e2a7b42fbbe08a.zip
fix discord.js breaking changes, some other stuff
Diffstat (limited to 'src/commands/dev/sh.ts')
-rw-r--r--src/commands/dev/sh.ts7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/commands/dev/sh.ts b/src/commands/dev/sh.ts
index 9956897..f74dedf 100644
--- a/src/commands/dev/sh.ts
+++ b/src/commands/dev/sh.ts
@@ -2,8 +2,9 @@ import { BushCommand, type BushMessage, type BushSlashMessage } from '#lib';
import assert from 'assert';
import chalk from 'chalk';
import { exec } from 'child_process';
-import { MessageEmbed, Util } from 'discord.js';
+import { ApplicationCommandOptionType, MessageEmbed, Util } from 'discord.js';
import { promisify } from 'util';
+
assert(chalk);
const sh = promisify(exec);
@@ -30,7 +31,7 @@ export default class ShCommand extends BushCommand {
match: 'rest',
prompt: 'What would you like run',
retry: '{error} Invalid command to run.',
- slashType: 'STRING'
+ slashType: ApplicationCommandOptionType.String
}
],
ownerOnly: true,
@@ -46,7 +47,7 @@ export default class ShCommand extends BushCommand {
const embed = new MessageEmbed()
.setColor(util.colors.gray)
- .setFooter({ text: message.author.tag, iconURL: message.author.avatarURL({ dynamic: true }) ?? undefined })
+ .setFooter({ text: message.author.tag, iconURL: message.author.avatarURL() ?? undefined })
.setTimestamp()
.setTitle('Shell Command')
.addField('📥 Input', await util.codeblock(input, 1024, 'sh', true))