diff options
author | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-29 16:05:18 -0500 |
---|---|---|
committer | IRONM00N <64110067+IRONM00N@users.noreply.github.com> | 2021-12-29 16:05:18 -0500 |
commit | f9cf43fc47be2d497d92d728ea892246df96d736 (patch) | |
tree | b5bf3d9641d5363fa581fc5b2464a3aeec53f5d0 /src | |
parent | 0a709c1ef397891c8e17cd57c0e7d3adbc7441ad (diff) | |
download | tanzanite-f9cf43fc47be2d497d92d728ea892246df96d736.tar.gz tanzanite-f9cf43fc47be2d497d92d728ea892246df96d736.tar.bz2 tanzanite-f9cf43fc47be2d497d92d728ea892246df96d736.zip |
import type
Diffstat (limited to 'src')
38 files changed, 59 insertions, 54 deletions
diff --git a/src/arguments/contentWithDuration.ts b/src/arguments/contentWithDuration.ts index 3d87061..cd8549b 100644 --- a/src/arguments/contentWithDuration.ts +++ b/src/arguments/contentWithDuration.ts @@ -1,4 +1,4 @@ -import { ParsedDuration, type BushArgumentTypeCaster } from '#lib'; +import { type BushArgumentTypeCaster, type ParsedDuration } from '#lib'; export const contentWithDuration: BushArgumentTypeCaster<Promise<ParsedDuration>> = async (_, phrase) => { return client.util.parseDuration(phrase); diff --git a/src/arguments/globalUser.ts b/src/arguments/globalUser.ts index 89e8324..69d3e89 100644 --- a/src/arguments/globalUser.ts +++ b/src/arguments/globalUser.ts @@ -1,4 +1,4 @@ -import { BushUser, type BushArgumentTypeCaster } from '#lib'; +import { type BushArgumentTypeCaster, type BushUser } from '#lib'; // resolve non-cached users export const globalUser: BushArgumentTypeCaster<Promise<BushUser | null>> = async (_, phrase) => { diff --git a/src/arguments/messageLink.ts b/src/arguments/messageLink.ts index 80aacde..2a9800c 100644 --- a/src/arguments/messageLink.ts +++ b/src/arguments/messageLink.ts @@ -1,4 +1,4 @@ -import { Message } from 'discord.js'; +import { type Message } from 'discord.js'; import { type BushArgumentTypeCaster } from '../lib'; export const messageLink: BushArgumentTypeCaster<Promise<Message | null>> = async (_, phrase) => { diff --git a/src/arguments/permission.ts b/src/arguments/permission.ts index 7a43216..4ae6327 100644 --- a/src/arguments/permission.ts +++ b/src/arguments/permission.ts @@ -1,5 +1,5 @@ import { type BushArgumentTypeCaster } from '#lib'; -import { Permissions, PermissionString } from 'discord.js'; +import { Permissions, type PermissionString } from 'discord.js'; export const permission: BushArgumentTypeCaster<PermissionString | null> = (_, phrase) => { if (!phrase) return null; diff --git a/src/arguments/roleWithDuration.ts b/src/arguments/roleWithDuration.ts index b0357dd..d619b9e 100644 --- a/src/arguments/roleWithDuration.ts +++ b/src/arguments/roleWithDuration.ts @@ -1,5 +1,5 @@ import { type BushArgumentTypeCaster } from '#lib'; -import { Role } from 'discord.js'; +import { type Role } from 'discord.js'; export const roleWithDuration: BushArgumentTypeCaster<Promise<RoleWithDuration | null>> = async (message, phrase) => { // eslint-disable-next-line prefer-const diff --git a/src/commands/admin/channelPermissions.ts b/src/commands/admin/channelPermissions.ts index b94094c..8c7c540 100644 --- a/src/commands/admin/channelPermissions.ts +++ b/src/commands/admin/channelPermissions.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, ButtonPaginator, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; export default class ChannelPermissionsCommand extends BushCommand { diff --git a/src/commands/admin/roleAll.ts b/src/commands/admin/roleAll.ts index a946e33..5ef379a 100644 --- a/src/commands/admin/roleAll.ts +++ b/src/commands/admin/roleAll.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { type GuildMember } from 'discord.js'; export default class RoleAllCommand extends BushCommand { diff --git a/src/commands/config/log.ts b/src/commands/config/log.ts index c61a6d5..ad3aacc 100644 --- a/src/commands/config/log.ts +++ b/src/commands/config/log.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, guildLogsArr, type BushMessage, type BushSlashMessage, type GuildLogType } from '#lib'; +import { BushCommand, guildLogsArr, type ArgType, type BushMessage, type BushSlashMessage, type GuildLogType } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; export default class LogCommand extends BushCommand { diff --git a/src/commands/fun/minesweeper.ts b/src/commands/fun/minesweeper.ts index 0b6c89c..5e0b452 100644 --- a/src/commands/fun/minesweeper.ts +++ b/src/commands/fun/minesweeper.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { Minesweeper } from '@notenoughupdates/discord.js-minesweeper'; export default class MinesweeperCommand extends BushCommand { diff --git a/src/commands/info/avatar.ts b/src/commands/info/avatar.ts index 3436b87..ce2543f 100644 --- a/src/commands/info/avatar.ts +++ b/src/commands/info/avatar.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { GuildMember, MessageEmbed } from 'discord.js'; export default class AvatarCommand extends BushCommand { diff --git a/src/commands/info/color.ts b/src/commands/info/color.ts index 2f9751b..7f3e593 100644 --- a/src/commands/info/color.ts +++ b/src/commands/info/color.ts @@ -1,8 +1,8 @@ import { AllowedMentions, - ArgType, - BushArgumentTypeCaster, BushCommand, + type ArgType, + type BushArgumentTypeCaster, type BushGuildMember, type BushMessage, type BushRole, diff --git a/src/commands/info/guildInfo.ts b/src/commands/info/guildInfo.ts index 67150f6..e543eee 100644 --- a/src/commands/info/guildInfo.ts +++ b/src/commands/info/guildInfo.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { Constants, Guild, diff --git a/src/commands/info/pronouns.ts b/src/commands/info/pronouns.ts index 3dacede..9b9f870 100644 --- a/src/commands/info/pronouns.ts +++ b/src/commands/info/pronouns.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; export default class PronounsCommand extends BushCommand { diff --git a/src/commands/info/snowflake.ts b/src/commands/info/snowflake.ts index 1658da9..1a41257 100644 --- a/src/commands/info/snowflake.ts +++ b/src/commands/info/snowflake.ts @@ -1,8 +1,7 @@ -import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, SnowflakeUtil, - VoiceChannel, type CategoryChannel, type DeconstructedSnowflake, type DMChannel, @@ -12,7 +11,8 @@ import { type Snowflake, type StageChannel, type TextChannel, - type User + type User, + type VoiceChannel } from 'discord.js'; export default class SnowflakeCommand extends BushCommand { diff --git a/src/commands/leveling/leaderboard.ts b/src/commands/leveling/leaderboard.ts index d53d358..ffed9e9 100644 --- a/src/commands/leveling/leaderboard.ts +++ b/src/commands/leveling/leaderboard.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, ButtonPaginator, Level, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, ButtonPaginator, Level, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; export default class LeaderboardCommand extends BushCommand { diff --git a/src/commands/leveling/level.ts b/src/commands/leveling/level.ts index ed8466d..47bcdc1 100644 --- a/src/commands/leveling/level.ts +++ b/src/commands/leveling/level.ts @@ -1,9 +1,9 @@ import { AllowedMentions, - ArgType, BushCommand, CanvasProgressBar, Level, + type ArgType, type BushGuild, type BushMessage, type BushSlashMessage, diff --git a/src/commands/leveling/setLevel.ts b/src/commands/leveling/setLevel.ts index 5118a8b..184ee1b 100644 --- a/src/commands/leveling/setLevel.ts +++ b/src/commands/leveling/setLevel.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, ArgType, BushCommand, Level, type BushMessage, type BushSlashMessage } from '#lib'; +import { AllowedMentions, BushCommand, Level, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; export default class SetLevelCommand extends BushCommand { public constructor() { diff --git a/src/commands/leveling/setXp.ts b/src/commands/leveling/setXp.ts index eeafff3..d6f28b2 100644 --- a/src/commands/leveling/setXp.ts +++ b/src/commands/leveling/setXp.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, ArgType, BushCommand, Level, type BushMessage, type BushSlashMessage } from '#lib'; +import { AllowedMentions, BushCommand, Level, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; export default class SetXpCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/ban.ts b/src/commands/moderation/ban.ts index c0375e0..40ac506 100644 --- a/src/commands/moderation/ban.ts +++ b/src/commands/moderation/ban.ts @@ -1,11 +1,11 @@ import { AllowedMentions, - ArgType, BushCommand, Moderation, - OptionalArgType, + type ArgType, type BushMessage, - type BushSlashMessage + type BushSlashMessage, + type OptionalArgType } from '#lib'; import { type User } from 'discord.js'; diff --git a/src/commands/moderation/kick.ts b/src/commands/moderation/kick.ts index b59b9f9..587f89e 100644 --- a/src/commands/moderation/kick.ts +++ b/src/commands/moderation/kick.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, ArgType, BushCommand, Moderation, type BushMessage, type BushSlashMessage } from '#lib'; +import { AllowedMentions, BushCommand, Moderation, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; export default class KickCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/modlog.ts b/src/commands/moderation/modlog.ts index be6e6b4..8651afe 100644 --- a/src/commands/moderation/modlog.ts +++ b/src/commands/moderation/modlog.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, ButtonPaginator, ModLog, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, ButtonPaginator, ModLog, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed, User } from 'discord.js'; export default class ModlogCommand extends BushCommand { diff --git a/src/commands/moderation/mute.ts b/src/commands/moderation/mute.ts index 2c0a1e8..ae37fed 100644 --- a/src/commands/moderation/mute.ts +++ b/src/commands/moderation/mute.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, ArgType, BushCommand, Moderation, type BushMessage, type BushSlashMessage } from '#lib'; +import { AllowedMentions, BushCommand, Moderation, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; export default class MuteCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/role.ts b/src/commands/moderation/role.ts index 651762b..2375bff 100644 --- a/src/commands/moderation/role.ts +++ b/src/commands/moderation/role.ts @@ -1,6 +1,6 @@ -import { AllowedMentions, ArgType, BushCommand, OptionalArgType, type BushMessage, type BushSlashMessage } from '#lib'; +import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib'; import { type ArgumentOptions, type Flag } from 'discord-akairo'; -import { Snowflake } from 'discord.js'; +import { type Snowflake } from 'discord.js'; export default class RoleCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/slowmode.ts b/src/commands/moderation/slowmode.ts index d38b266..3d53edc 100644 --- a/src/commands/moderation/slowmode.ts +++ b/src/commands/moderation/slowmode.ts @@ -1,6 +1,6 @@ -import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { Argument } from 'discord-akairo'; -import { TextChannel, ThreadChannel } from 'discord.js'; +import { type TextChannel, type ThreadChannel } from 'discord.js'; export default class SlowModeCommand extends BushCommand { public constructor() { diff --git a/src/commands/moderation/unban.ts b/src/commands/moderation/unban.ts index dbbb9a5..03c60c0 100644 --- a/src/commands/moderation/unban.ts +++ b/src/commands/moderation/unban.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, ArgType, BushCommand, OptionalArgType, type BushMessage, type BushSlashMessage } from '#lib'; +import { AllowedMentions, BushCommand, type ArgType, type BushMessage, type BushSlashMessage, type OptionalArgType } from '#lib'; export default class UnbanCommand extends BushCommand { public constructor() { diff --git a/src/commands/moulberry-bush/capePerms.ts b/src/commands/moulberry-bush/capePerms.ts index 8dd51fe..71ca78e 100644 --- a/src/commands/moulberry-bush/capePerms.ts +++ b/src/commands/moulberry-bush/capePerms.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; import got from 'got'; diff --git a/src/commands/moulberry-bush/capes.ts b/src/commands/moulberry-bush/capes.ts index fe18d89..4bdb360 100644 --- a/src/commands/moulberry-bush/capes.ts +++ b/src/commands/moulberry-bush/capes.ts @@ -1,4 +1,4 @@ -import { BushCommand, ButtonPaginator, DeleteButton, OptionalArgType, type BushMessage } from '#lib'; +import { BushCommand, ButtonPaginator, DeleteButton, type BushMessage, type OptionalArgType } from '#lib'; import { type MessageEmbedOptions } from 'discord.js'; import got from 'got'; diff --git a/src/commands/moulberry-bush/moulHammer.ts b/src/commands/moulberry-bush/moulHammer.ts index ffb9afb..6d87571 100644 --- a/src/commands/moulberry-bush/moulHammer.ts +++ b/src/commands/moulberry-bush/moulHammer.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, BushSlashMessage, type BushMessage } from '#lib'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; export default class MoulHammerCommand extends BushCommand { diff --git a/src/commands/moulberry-bush/report.ts b/src/commands/moulberry-bush/report.ts index a65cfcf..ae67e00 100644 --- a/src/commands/moulberry-bush/report.ts +++ b/src/commands/moulberry-bush/report.ts @@ -1,4 +1,4 @@ -import { AllowedMentions, ArgType, BushCommand, type BushMessage } from '#lib'; +import { AllowedMentions, BushCommand, type ArgType, type BushMessage } from '#lib'; import { MessageEmbed } from 'discord.js'; import moment from 'moment'; @@ -60,7 +60,7 @@ export default class ReportCommand extends BushCommand { //The formatting of the report is mostly copied from carl since it is pretty good when it actually works const reportEmbed = new MessageEmbed() - .setFooter(`Reporter ID: ${message.author.id} Reported ID: ${member.user.id}`) + .setFooter({ text: `Reporter ID: ${message.author.id} Reported ID: ${member.user.id}` }) .setTimestamp() .setAuthor({ name: `Report From: ${message.author.tag}`, diff --git a/src/commands/utilities/activity.ts b/src/commands/utilities/activity.ts index fe21aec..6801358 100644 --- a/src/commands/utilities/activity.ts +++ b/src/commands/utilities/activity.ts @@ -1,5 +1,5 @@ -import { ArgType, BushCommand, type BushMessage, type BushSlashMessage } from '#lib'; -import { DiscordAPIError, Message } from 'discord.js'; +import { BushCommand, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; +import { type DiscordAPIError, type Message } from 'discord.js'; const activityMap = { 'Poker Night': { diff --git a/src/commands/utilities/whoHasRole.ts b/src/commands/utilities/whoHasRole.ts index ffb7ce1..60543c1 100644 --- a/src/commands/utilities/whoHasRole.ts +++ b/src/commands/utilities/whoHasRole.ts @@ -1,4 +1,4 @@ -import { ArgType, BushCommand, ButtonPaginator, type BushMessage, type BushSlashMessage } from '#lib'; +import { BushCommand, ButtonPaginator, type ArgType, type BushMessage, type BushSlashMessage } from '#lib'; import { Util, type CommandInteraction } from 'discord.js'; export default class WhoHasRoleCommand extends BushCommand { diff --git a/src/context-menu-commands/user/userInfo.ts b/src/context-menu-commands/user/userInfo.ts index 1e35093..f654be7 100644 --- a/src/context-menu-commands/user/userInfo.ts +++ b/src/context-menu-commands/user/userInfo.ts @@ -1,4 +1,4 @@ -import { BushGuild, BushGuildMember, BushUser } from '#lib'; +import { type BushGuild, type BushGuildMember, type BushUser } from '#lib'; import { ContextMenuCommand } from 'discord-akairo'; import { type ContextMenuInteraction } from 'discord.js'; import UserInfoCommand from '../../commands/info/userInfo.js'; diff --git a/src/lib/common/util/Arg.ts b/src/lib/common/util/Arg.ts index 2577db9..01d3b0b 100644 --- a/src/lib/common/util/Arg.ts +++ b/src/lib/common/util/Arg.ts @@ -1,4 +1,4 @@ -import { BaseBushArgumentType, BushArgumentTypeCaster, BushSlashMessage, type BushArgumentType } from '#lib'; +import { type BaseBushArgumentType, type BushArgumentType, type BushArgumentTypeCaster, type BushSlashMessage } from '#lib'; import { Argument, type Flag, type ParsedValuePredicate } from 'discord-akairo'; import { type Message } from 'discord.js'; diff --git a/src/lib/extensions/discord.js/BushCommandInteraction.ts b/src/lib/extensions/discord.js/BushCommandInteraction.ts index e6643f0..5f32829 100644 --- a/src/lib/extensions/discord.js/BushCommandInteraction.ts +++ b/src/lib/extensions/discord.js/BushCommandInteraction.ts @@ -1,13 +1,18 @@ -import type { BushApplicationCommand, BushGuild, BushGuildEmoji, BushGuildMember, BushRole, BushUser } from '#lib'; -import type { APIInteractionGuildMember } from 'discord-api-types/v9'; -import { CommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js'; -import type { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes'; -import { +import type { + BushApplicationCommand, + BushClient, + BushGuild, + BushGuildEmoji, + BushGuildMember, BushGuildTextBasedChannel, BushNonThreadGuildBasedChannel, + BushRole, BushTextBasedChannel, - type BushClient -} from '../discord-akairo/BushClient'; + BushUser +} from '#lib'; +import type { APIInteractionGuildMember } from 'discord-api-types/v9'; +import { CommandInteraction, type CacheType, type CacheTypeReducer, type Invite, type Snowflake } from 'discord.js'; +import type { RawCommandInteractionData } from 'discord.js/typings/rawDataTypes'; export type BushGuildResolvable = | BushGuild diff --git a/src/lib/utils/BushCache.ts b/src/lib/utils/BushCache.ts index 476f516..cea0aea 100644 --- a/src/lib/utils/BushCache.ts +++ b/src/lib/utils/BushCache.ts @@ -1,5 +1,5 @@ +import { type Guild } from '#lib'; import { Collection, type Snowflake } from 'discord.js'; -import { Guild } from '../models/Guild.js'; export class BushCache { public global = new GlobalCache(); diff --git a/src/listeners/commands/commandBlocked.ts b/src/listeners/commands/commandBlocked.ts index 2243abd..2dfe4cd 100644 --- a/src/listeners/commands/commandBlocked.ts +++ b/src/listeners/commands/commandBlocked.ts @@ -1,4 +1,4 @@ -import { BushListener, BushSlashMessage, type BushCommand, type BushCommandHandlerEvents, type BushMessage } from '#lib'; +import { BushListener, type BushCommand, type BushCommandHandlerEvents, type BushMessage, type BushSlashMessage } from '#lib'; import { type InteractionReplyOptions, type Message, type MessagePayload, type ReplyMessageOptions } from 'discord.js'; export default class CommandBlockedListener extends BushListener { diff --git a/src/listeners/commands/commandError.ts b/src/listeners/commands/commandError.ts index f26ff7f..9e7417d 100644 --- a/src/listeners/commands/commandError.ts +++ b/src/listeners/commands/commandError.ts @@ -1,6 +1,6 @@ import { type BushCommandHandlerEvents } from '#lib'; import { Severity } from '@sentry/types'; -import { Command, type AkairoMessage } from 'discord-akairo'; +import { type AkairoMessage, type Command } from 'discord-akairo'; import { Formatters, GuildTextBasedChannel, MessageEmbed, type DMChannel, type Message } from 'discord.js'; import { BushListener } from '../../lib/extensions/discord-akairo/BushListener.js'; diff --git a/src/listeners/guild/guildMemberRemove.ts b/src/listeners/guild/guildMemberRemove.ts index 6181d52..ae4c4df 100644 --- a/src/listeners/guild/guildMemberRemove.ts +++ b/src/listeners/guild/guildMemberRemove.ts @@ -1,9 +1,9 @@ import { - BushGuildMember, BushListener, - BushTextChannel, StickyRole, type BushClientEvents, + type BushGuildMember, + type BushTextChannel, type PartialBushGuildMember } from '#lib'; import { MessageEmbed } from 'discord.js'; |