aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-20 13:23:04 -0400
committerIRONM00N <64110067+IRONM00N@users.noreply.github.com>2021-08-20 13:23:04 -0400
commita0ef664d06efb1ecfab08fe4764758cd09f96a72 (patch)
treeda0e6b70fca49c0f282cdd25b834b4c59437cda6
parenteb381b80e60f01a635af3ffe80bf950bb4a73c30 (diff)
downloadtanzanite-a0ef664d06efb1ecfab08fe4764758cd09f96a72.tar.gz
tanzanite-a0ef664d06efb1ecfab08fe4764758cd09f96a72.tar.bz2
tanzanite-a0ef664d06efb1ecfab08fe4764758cd09f96a72.zip
fix steal fr I think
-rw-r--r--src/commands/utilities/steal.ts14
-rw-r--r--src/lib/utils/BushConstants.ts12
2 files changed, 14 insertions, 12 deletions
diff --git a/src/commands/utilities/steal.ts b/src/commands/utilities/steal.ts
index 097c902..01c39ea 100644
--- a/src/commands/utilities/steal.ts
+++ b/src/commands/utilities/steal.ts
@@ -8,8 +8,8 @@ export default class StealCommand extends BushCommand {
category: 'utilities',
description: {
content: 'Steal an emoji from another server and add it to your own.',
- usage: 'steal <emoji/url> [--name name]',
- examples: ['steal <:omegaclown:782630946435366942> --name ironm00n']
+ usage: 'steal <emoji/emoji id/url> [name]',
+ examples: ['steal <:omegaclown:782630946435366942> ironm00n']
},
args: [
{
@@ -33,7 +33,7 @@ export default class StealCommand extends BushCommand {
}
public override async exec(
message: BushMessage,
- args?: { emojiOrName?: { name: string; id: Snowflake } | Snowflake | URL | string; name: string }
+ args?: { emojiOrName?: { name: string; id: Snowflake } | Snowflake | URL | string; name2: string }
): Promise<unknown> {
if ((!args || !args.emojiOrName) && !message.attachments.size)
return await message.util.reply(`${util.emojis.error} You must provide an emoji to steal.`);
@@ -45,20 +45,20 @@ export default class StealCommand extends BushCommand {
? args.emojiOrName.href
: typeof args?.emojiOrName === 'object'
? `https://cdn.discordapp.com/emojis/${args.emojiOrName.id}`
- : client.consts.regex.discordEmoji.test(args?.emojiOrName ?? '')
+ : client.consts.regex.snowflake.test(args?.emojiOrName ?? '')
? `https://cdn.discordapp.com/emojis/${args!.emojiOrName}`
: undefined;
- if (!image) return await message.util.reply(`${util.emojis.error} You must provide an emoji to steal.`);
+ if (image === undefined) return await message.util.reply(`${util.emojis.error} You must provide an emoji to steal.`);
if (message.attachments.size && typeof args?.emojiOrName !== 'string')
return await message.util.reply(`${util.emojis.error} You cannot attach an image and provide an argument.`);
const emojiName = message.attachments.size
? (args?.emojiOrName as string) ?? 'stolen_emoji'
: args?.emojiOrName instanceof URL
- ? args?.name ?? 'stolen_emoji'
+ ? args?.name2 ?? 'stolen_emoji'
: typeof args?.emojiOrName === 'object'
- ? args?.name ?? args.emojiOrName.name ?? 'stolen_emoji'
+ ? args?.name2 ?? args.emojiOrName.name ?? 'stolen_emoji'
: 'stolen_emoji';
const creationSuccess = await message
diff --git a/src/lib/utils/BushConstants.ts b/src/lib/utils/BushConstants.ts
index de3076a..bcc34ae 100644
--- a/src/lib/utils/BushConstants.ts
+++ b/src/lib/utils/BushConstants.ts
@@ -24,10 +24,10 @@ interface bushColors {
export class BushConstants {
public static emojis = {
- success: '<:checkmark:837109864101707807>',
+ success: '<:success:837109864101707807>',
warn: '<:warn:848726900876247050>',
error: '<:error:837123021016924261>',
- successFull: '<:checkmark_full:850118767576088646>',
+ successFull: '<:success_full:850118767576088646>',
warnFull: '<:warn_full:850118767391539312>',
errorFull: '<:error_full:850118767295201350>',
mad: '<:mad:783046135392239626>',
@@ -37,7 +37,9 @@ export class BushConstants {
offlineCircle: '<:offline:787550565382750239>',
dndCircle: '<:dnd:787550487633330176>',
idleCircle: '<:idle:787550520956551218>',
- onlineCircle: '<:online:787550449435803658>'
+ onlineCircle: '<:online:787550449435803658>',
+ cross: '<:cross:878319362539421777>',
+ check: ''
};
public static colors: bushColors = {
@@ -101,9 +103,9 @@ export class BushConstants {
};
public static regex = {
- snowflake: /\d{15,21}/gim,
+ snowflake: /\d{15,21}/im,
// eslint-disable-next-line no-useless-escape
- discordEmoji: /<a?:(?<name>[a-zA-Z0-9\_]+):(?<id>\d{15,21})>/gim
+ discordEmoji: /<a?:(?<name>[a-zA-Z0-9\_]+):(?<id>\d{15,21})>/im
};
/** A bunch of mappings */