aboutsummaryrefslogtreecommitdiff
path: root/src/commands
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-07 22:15:18 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-07 22:15:18 -0400
commit06f85e0fbabd031240559470be59ceb2be420fab (patch)
tree3bcdab99dbbd2c124133e6474938a5be379c7e7f /src/commands
parent931dde0b1530573170a60c8046a6f12519db08e9 (diff)
downloadtanzanite-06f85e0fbabd031240559470be59ceb2be420fab.tar.gz
tanzanite-06f85e0fbabd031240559470be59ceb2be420fab.tar.bz2
tanzanite-06f85e0fbabd031240559470be59ceb2be420fab.zip
few fixes
Diffstat (limited to 'src/commands')
-rw-r--r--src/commands/config/blacklist.ts1
-rw-r--r--src/commands/config/settings.ts59
-rw-r--r--src/commands/info/color.ts13
-rw-r--r--src/commands/utilities/viewraw.ts1
4 files changed, 69 insertions, 5 deletions
diff --git a/src/commands/config/blacklist.ts b/src/commands/config/blacklist.ts
index 78b0446..864081c 100644
--- a/src/commands/config/blacklist.ts
+++ b/src/commands/config/blacklist.ts
@@ -16,7 +16,6 @@ export default class BlacklistCommand extends BushCommand {
{
id: 'target',
customType: Argument.union('channel', 'user'),
-
prompt: {
start: 'What channel or user that you would like to blacklist/unblacklist?',
retry: '{error} Pick a valid command.',
diff --git a/src/commands/config/settings.ts b/src/commands/config/settings.ts
new file mode 100644
index 0000000..f474804
--- /dev/null
+++ b/src/commands/config/settings.ts
@@ -0,0 +1,59 @@
+// import { BushCommand, BushMessage, BushSlashMessage } from '@lib';
+
+// export default class SettingsCommand extends BushCommand {
+// public constructor() {
+// super('settings', {
+// aliases: ['settings'],
+// category: 'config',
+// description: {
+// content: 'Configure options for ',
+// usage: 'template <requiredArg> [optionalArg]',
+// examples: ['template 1 2']
+// },
+// args: [
+// {
+// id: 'required_argument',
+// type: 'string',
+// prompt: {
+// start: 'What would you like to set your first argument to be?',
+// retry: '{error} Pick a valid argument.',
+// optional: false
+// }
+// },
+// {
+// id: 'optional_argument',
+// type: 'string',
+// prompt: {
+// start: 'What would you like to set your second argument to be?',
+// retry: '{error} Pick a valid argument.',
+// optional: true
+// }
+// }
+// ],
+// slash: false, //set this to true
+// slashOptions: [
+// {
+// name: 'required_argument',
+// description: 'What would you like to set your first argument to be?',
+// type: 'STRING',
+// required: true
+// },
+// {
+// name: 'optional_argument',
+// description: 'What would you like to set your second argument to be?',
+// type: 'STRING',
+// required: false
+// }
+// ],
+// superUserOnly: true,
+// ownerOnly: true,
+// channel: 'guild',
+// hidden: true,
+// clientPermissions: ['SEND_MESSAGES'],
+// userPermissions: ['SEND_MESSAGES']
+// });
+// }
+// public override async exec(message: BushMessage | BushSlashMessage): Promise<unknown> {
+// return await message.util.reply(`${util.emojis.error} Do not use the template command.`);
+// }
+// }
diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts
index 7ceb37f..93dd439 100644
--- a/src/commands/info/color.ts
+++ b/src/commands/info/color.ts
@@ -1,6 +1,6 @@
-import { BushCommand, BushGuildMember, BushMessage, BushRole, BushSlashMessage } from '@lib';
+import { AllowedMentions, BushCommand, BushGuildMember, BushMessage, BushRole, BushSlashMessage } from '@lib';
import { Argument } from 'discord-akairo';
-import { ColorResolvable, MessageEmbed, Role } from 'discord.js';
+import { MessageEmbed, Role } from 'discord.js';
import { Constructor } from 'tinycolor2';
// eslint-disable-next-line @typescript-eslint/no-var-requires
@@ -51,12 +51,19 @@ export default class ColorCommand extends BushCommand {
? tinycolor(args.color.hexColor)
: tinycolor(args.color.displayHexColor);
+ if (args.color instanceof Role && args.color.hexColor === '#000000') {
+ return await message.util.reply({
+ content: `${util.emojis.error} <@&${args.color.id}> does not have a color.`,
+ allowedMentions: AllowedMentions.none()
+ });
+ }
+
const embed = new MessageEmbed()
.addField('» Hexadecimal', color.toHexString())
.addField('» Decimal', `${parseInt(color.toHex(), 16)}`)
.addField('» HSL', this.removePrefixAndParenthesis(color.toHslString()))
.addField('» RGB', this.removePrefixAndParenthesis(color.toRgbString()))
- .setColor(color.toHex() as ColorResolvable);
+ .setColor(color.toHex() as `#${string}`);
return await message.util.reply({ embeds: [embed] });
}
diff --git a/src/commands/utilities/viewraw.ts b/src/commands/utilities/viewraw.ts
index 46353ba..0a5f9e2 100644
--- a/src/commands/utilities/viewraw.ts
+++ b/src/commands/utilities/viewraw.ts
@@ -17,7 +17,6 @@ export default class ViewRawCommand extends BushCommand {
{
id: 'message',
customType: util.arg.union('message', 'bigint'),
-
prompt: {
start: 'What message would you like to view?',
retry: '{error} Choose a valid message.',