aboutsummaryrefslogtreecommitdiff
path: root/lib/arguments
diff options
context:
space:
mode:
Diffstat (limited to 'lib/arguments')
-rw-r--r--lib/arguments/abbreviatedNumber.ts4
-rw-r--r--lib/arguments/contentWithDuration.ts4
-rw-r--r--lib/arguments/discordEmoji.ts4
-rw-r--r--lib/arguments/duration.ts4
-rw-r--r--lib/arguments/durationSeconds.ts4
-rw-r--r--lib/arguments/globalUser.ts4
-rw-r--r--lib/arguments/messageLink.ts4
-rw-r--r--lib/arguments/permission.ts4
-rw-r--r--lib/arguments/roleWithDuration.ts4
-rw-r--r--lib/arguments/snowflake.ts4
-rw-r--r--lib/arguments/tinyColor.ts4
11 files changed, 22 insertions, 22 deletions
diff --git a/lib/arguments/abbreviatedNumber.ts b/lib/arguments/abbreviatedNumber.ts
index a7d8ce5..5fe39b5 100644
--- a/lib/arguments/abbreviatedNumber.ts
+++ b/lib/arguments/abbreviatedNumber.ts
@@ -1,9 +1,9 @@
-import type { BushArgumentTypeCaster } from '#lib';
+import type { BotArgumentTypeCaster } from '#lib';
import assert from 'assert/strict';
import numeral from 'numeral';
assert(typeof numeral === 'function');
-export const abbreviatedNumber: BushArgumentTypeCaster<number | null> = (_, phrase) => {
+export const abbreviatedNumber: BotArgumentTypeCaster<number | null> = (_, phrase) => {
if (!phrase) return null;
const num = numeral(phrase?.toLowerCase()).value();
diff --git a/lib/arguments/contentWithDuration.ts b/lib/arguments/contentWithDuration.ts
index 0efba39..ec015dc 100644
--- a/lib/arguments/contentWithDuration.ts
+++ b/lib/arguments/contentWithDuration.ts
@@ -1,5 +1,5 @@
-import { parseDuration, type BushArgumentTypeCaster, type ParsedDuration } from '#lib';
+import { parseDuration, type BotArgumentTypeCaster, type ParsedDuration } from '#lib';
-export const contentWithDuration: BushArgumentTypeCaster<Promise<ParsedDuration>> = async (_, phrase) => {
+export const contentWithDuration: BotArgumentTypeCaster<Promise<ParsedDuration>> = async (_, phrase) => {
return parseDuration(phrase);
};
diff --git a/lib/arguments/discordEmoji.ts b/lib/arguments/discordEmoji.ts
index 92d6502..0a0d168 100644
--- a/lib/arguments/discordEmoji.ts
+++ b/lib/arguments/discordEmoji.ts
@@ -1,7 +1,7 @@
-import { regex, type BushArgumentTypeCaster } from '#lib';
+import { regex, type BotArgumentTypeCaster } from '#lib';
import type { Snowflake } from 'discord.js';
-export const discordEmoji: BushArgumentTypeCaster<DiscordEmojiInfo | null> = (_, phrase) => {
+export const discordEmoji: BotArgumentTypeCaster<DiscordEmojiInfo | null> = (_, phrase) => {
if (!phrase) return null;
const validEmoji: RegExpExecArray | null = regex.discordEmoji.exec(phrase);
if (!validEmoji || !validEmoji.groups) return null;
diff --git a/lib/arguments/duration.ts b/lib/arguments/duration.ts
index 09dd3d5..4952dc4 100644
--- a/lib/arguments/duration.ts
+++ b/lib/arguments/duration.ts
@@ -1,5 +1,5 @@
-import { parseDuration, type BushArgumentTypeCaster } from '#lib';
+import { parseDuration, type BotArgumentTypeCaster } from '#lib';
-export const duration: BushArgumentTypeCaster<number | null> = (_, phrase) => {
+export const duration: BotArgumentTypeCaster<number | null> = (_, phrase) => {
return parseDuration(phrase).duration;
};
diff --git a/lib/arguments/durationSeconds.ts b/lib/arguments/durationSeconds.ts
index d8d6749..8deee5b 100644
--- a/lib/arguments/durationSeconds.ts
+++ b/lib/arguments/durationSeconds.ts
@@ -1,6 +1,6 @@
-import { parseDuration, type BushArgumentTypeCaster } from '#lib';
+import { parseDuration, type BotArgumentTypeCaster } from '#lib';
-export const durationSeconds: BushArgumentTypeCaster<number | null> = (_, phrase) => {
+export const durationSeconds: BotArgumentTypeCaster<number | null> = (_, phrase) => {
phrase += 's';
return parseDuration(phrase).duration;
};
diff --git a/lib/arguments/globalUser.ts b/lib/arguments/globalUser.ts
index 4324aa9..4198e3c 100644
--- a/lib/arguments/globalUser.ts
+++ b/lib/arguments/globalUser.ts
@@ -1,7 +1,7 @@
-import type { BushArgumentTypeCaster } from '#lib';
+import type { BotArgumentTypeCaster } from '#lib';
import type { User } from 'discord.js';
// resolve non-cached users
-export const globalUser: BushArgumentTypeCaster<Promise<User | null>> = async (message, phrase) => {
+export const globalUser: BotArgumentTypeCaster<Promise<User | null>> = async (message, phrase) => {
return message.client.users.resolve(phrase) ?? (await message.client.users.fetch(`${phrase}`).catch(() => null));
};
diff --git a/lib/arguments/messageLink.ts b/lib/arguments/messageLink.ts
index c95e42d..ffb48a0 100644
--- a/lib/arguments/messageLink.ts
+++ b/lib/arguments/messageLink.ts
@@ -1,7 +1,7 @@
-import { BushArgumentTypeCaster, regex } from '#lib';
+import { BotArgumentTypeCaster, regex } from '#lib';
import type { Message } from 'discord.js';
-export const messageLink: BushArgumentTypeCaster<Promise<Message | null>> = async (message, phrase) => {
+export const messageLink: BotArgumentTypeCaster<Promise<Message | null>> = async (message, phrase) => {
const match = new RegExp(regex.messageLink).exec(phrase);
if (!match || !match.groups) return null;
diff --git a/lib/arguments/permission.ts b/lib/arguments/permission.ts
index 98bfe74..4d09e9c 100644
--- a/lib/arguments/permission.ts
+++ b/lib/arguments/permission.ts
@@ -1,7 +1,7 @@
-import type { BushArgumentTypeCaster } from '#lib';
+import type { BotArgumentTypeCaster } from '#lib';
import { PermissionFlagsBits, type PermissionsString } from 'discord.js';
-export const permission: BushArgumentTypeCaster<PermissionsString | null> = (_, phrase) => {
+export const permission: BotArgumentTypeCaster<PermissionsString | null> = (_, phrase) => {
if (!phrase) return null;
phrase = phrase.toUpperCase().replace(/ /g, '_');
if (!(phrase in PermissionFlagsBits)) {
diff --git a/lib/arguments/roleWithDuration.ts b/lib/arguments/roleWithDuration.ts
index b97f205..9391c75 100644
--- a/lib/arguments/roleWithDuration.ts
+++ b/lib/arguments/roleWithDuration.ts
@@ -1,7 +1,7 @@
-import { Arg, BushArgumentTypeCaster, parseDuration } from '#lib';
+import { Arg, BotArgumentTypeCaster, parseDuration } from '#lib';
import type { Role } from 'discord.js';
-export const roleWithDuration: BushArgumentTypeCaster<Promise<RoleWithDuration | null>> = async (message, phrase) => {
+export const roleWithDuration: BotArgumentTypeCaster<Promise<RoleWithDuration | null>> = async (message, phrase) => {
// eslint-disable-next-line prefer-const
let { duration, content } = parseDuration(phrase);
if (content === null || content === undefined) return null;
diff --git a/lib/arguments/snowflake.ts b/lib/arguments/snowflake.ts
index b98a20f..ab0c7fc 100644
--- a/lib/arguments/snowflake.ts
+++ b/lib/arguments/snowflake.ts
@@ -1,7 +1,7 @@
-import { BushArgumentTypeCaster, regex } from '#lib';
+import { BotArgumentTypeCaster, regex } from '#lib';
import type { Snowflake } from 'discord.js';
-export const snowflake: BushArgumentTypeCaster<Snowflake | null> = (_, phrase) => {
+export const snowflake: BotArgumentTypeCaster<Snowflake | null> = (_, phrase) => {
if (!phrase) return null;
if (regex.snowflake.test(phrase)) return phrase;
return null;
diff --git a/lib/arguments/tinyColor.ts b/lib/arguments/tinyColor.ts
index 148c078..2eb6ab2 100644
--- a/lib/arguments/tinyColor.ts
+++ b/lib/arguments/tinyColor.ts
@@ -1,9 +1,9 @@
-import type { BushArgumentTypeCaster } from '#lib';
+import type { BotArgumentTypeCaster } from '#lib';
import assert from 'assert/strict';
import tinycolorModule from 'tinycolor2';
assert(tinycolorModule);
-export const tinyColor: BushArgumentTypeCaster<string | null> = (_message, phrase) => {
+export const tinyColor: BotArgumentTypeCaster<string | null> = (_message, phrase) => {
// if the phase is a number it converts it to hex incase it could be representing a color in decimal
const newPhase = isNaN(phrase as any) ? phrase : `#${Number(phrase).toString(16)}`;
return tinycolorModule(newPhase).isValid() ? newPhase : null;