diff --git a/src/commands/finduser.ts b/src/commands/finduser.ts index 5c1773b..ec265cd 100644 --- a/src/commands/finduser.ts +++ b/src/commands/finduser.ts @@ -1,7 +1,6 @@ -import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, GuildBasedChannel, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; -import { Database } from '../shared/Database'; -import { channelIsInStaffCategory, deferInteraction, getDiscordAlts, getE621User } from '../utils'; +import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; import { config } from '../config'; +import { deferInteraction, getDiscordAlts, getE621User } from '../utils'; export default { name: 'finduser', diff --git a/src/commands/github-mapping.ts b/src/commands/github-mapping.ts index 3e77e0f..337904a 100644 --- a/src/commands/github-mapping.ts +++ b/src/commands/github-mapping.ts @@ -1,5 +1,4 @@ -import { ApplicationIntegrationType, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; -import { channelIsInStaffCategory, handleWhoIsInteraction } from '../utils'; +import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; import { Database } from '../shared/Database'; const mentionRegex = new RegExp(MessageMentions.UsersPattern); diff --git a/src/commands/name-sync.ts b/src/commands/name-sync.ts index af71710..f2e7d41 100644 --- a/src/commands/name-sync.ts +++ b/src/commands/name-sync.ts @@ -1,8 +1,6 @@ -import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; -import { Database } from '../shared/Database'; -import { getE621User, syncName } from '../utils'; +import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, SlashCommandBuilder } from 'discord.js'; import { config } from '../config'; -import { E621User } from '../types'; +import { syncName } from '../utils'; export default { name: 'name-sync', diff --git a/src/commands/records.ts b/src/commands/records.ts index fe58be9..e98589e 100644 --- a/src/commands/records.ts +++ b/src/commands/records.ts @@ -1,5 +1,5 @@ -import { ApplicationIntegrationType, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; -import { channelIsInStaffCategory, deferInteraction, handleWhoIsInteraction } from '../utils'; +import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; +import { deferInteraction } from '../utils'; import { getRecordMessageFromDiscordId } from '../utils/record-utils'; export default { diff --git a/src/commands/settings.ts b/src/commands/settings.ts index c8d7459..3431448 100644 --- a/src/commands/settings.ts +++ b/src/commands/settings.ts @@ -1,5 +1,4 @@ -import { ApplicationIntegrationType, ChannelType, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, RateLimitError, SlashCommandBuilder } from 'discord.js'; -import { msToHuman } from '../utils'; +import { ApplicationIntegrationType, ChannelType, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; import { Database } from '../shared/Database'; export default { diff --git a/src/commands/softban.ts b/src/commands/softban.ts index 17bdbd7..9e85dc8 100644 --- a/src/commands/softban.ts +++ b/src/commands/softban.ts @@ -1,6 +1,5 @@ -import { ApplicationIntegrationType, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, GuildMember, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; -import { channelIsInStaffCategory, deferInteraction, handleWhoIsInteraction } from '../utils'; -import { getRecordMessageFromDiscordId } from '../utils/record-utils'; +import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, GuildMember, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; +import { deferInteraction } from '../utils'; export default { name: 'softban', diff --git a/src/commands/whois.ts b/src/commands/whois.ts index 8ef069d..aad3136 100644 --- a/src/commands/whois.ts +++ b/src/commands/whois.ts @@ -1,4 +1,4 @@ -import { ApplicationIntegrationType, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; +import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, GuildBasedChannel, InteractionContextType, MessageMentions, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js'; import { channelIsInStaffCategory, handleWhoIsInteraction } from '../utils'; const mentionRegex = new RegExp(MessageMentions.UsersPattern); diff --git a/src/context-menus/add-note.ts b/src/context-menus/add-note.ts index b723442..4b36b51 100644 --- a/src/context-menus/add-note.ts +++ b/src/context-menus/add-note.ts @@ -1,5 +1,4 @@ -import { ApplicationIntegrationType, Client, InteractionContextType, PermissionFlagsBits, ContextMenuCommandBuilder, ApplicationCommandType, UserContextMenuCommandInteraction, GuildBasedChannel, ModalBuilder, TextInputBuilder, GuildMember, TextInputStyle, ActionRowBuilder } from 'discord.js'; -import { channelIsInStaffCategory, deferInteraction, getNoteMessage, handleWhoIsInteraction } from '../utils'; +import { ActionRowBuilder, ApplicationCommandType, ApplicationIntegrationType, Client, ContextMenuCommandBuilder, InteractionContextType, ModalBuilder, PermissionFlagsBits, TextInputBuilder, TextInputStyle, UserContextMenuCommandInteraction } from 'discord.js'; export default { name: 'Add Note', diff --git a/src/context-menus/list-notes.ts b/src/context-menus/list-notes.ts index 232fe3d..f561fcd 100644 --- a/src/context-menus/list-notes.ts +++ b/src/context-menus/list-notes.ts @@ -1,5 +1,5 @@ -import { ApplicationIntegrationType, Client, InteractionContextType, PermissionFlagsBits, ContextMenuCommandBuilder, ApplicationCommandType, UserContextMenuCommandInteraction, GuildBasedChannel } from 'discord.js'; -import { channelIsInStaffCategory, deferInteraction, getNoteMessage, handleWhoIsInteraction } from '../utils'; +import { ApplicationCommandType, ApplicationIntegrationType, Client, ContextMenuCommandBuilder, InteractionContextType, PermissionFlagsBits, UserContextMenuCommandInteraction } from 'discord.js'; +import { deferInteraction, getNoteMessage } from '../utils'; export default { name: 'List Notes', diff --git a/src/context-menus/records.ts b/src/context-menus/records.ts index bf8e5f6..7b1beb0 100644 --- a/src/context-menus/records.ts +++ b/src/context-menus/records.ts @@ -1,5 +1,5 @@ -import { ApplicationIntegrationType, Client, InteractionContextType, PermissionFlagsBits, ContextMenuCommandBuilder, ApplicationCommandType, UserContextMenuCommandInteraction, GuildBasedChannel, MessageFlags } from 'discord.js'; -import { channelIsInStaffCategory, deferInteraction, getRecordMessageFromDiscordId, handleWhoIsInteraction } from '../utils'; +import { ApplicationCommandType, ApplicationIntegrationType, Client, ContextMenuCommandBuilder, InteractionContextType, PermissionFlagsBits, UserContextMenuCommandInteraction } from 'discord.js'; +import { deferInteraction, getRecordMessageFromDiscordId } from '../utils'; export default { name: 'Get Records', diff --git a/src/context-menus/sync-name.ts b/src/context-menus/sync-name.ts index 17e2f17..ab2c1ee 100644 --- a/src/context-menus/sync-name.ts +++ b/src/context-menus/sync-name.ts @@ -1,7 +1,7 @@ -import { ApplicationIntegrationType, Client, InteractionContextType, PermissionFlagsBits, ContextMenuCommandBuilder, ApplicationCommandType, UserContextMenuCommandInteraction, GuildBasedChannel, MessageFlags, ActionRowBuilder, ModalBuilder, TextInputBuilder, TextInputStyle } from 'discord.js'; -import { channelIsInStaffCategory, deferInteraction, getRecordMessageFromDiscordId, handleWhoIsInteraction, syncName } from '../utils'; -import { Database } from '../shared/Database'; +import { ActionRowBuilder, ApplicationCommandType, ApplicationIntegrationType, Client, ContextMenuCommandBuilder, InteractionContextType, ModalBuilder, PermissionFlagsBits, TextInputBuilder, TextInputStyle, UserContextMenuCommandInteraction } from 'discord.js'; import { config } from '../config'; +import { Database } from '../shared/Database'; +import { deferInteraction, syncName } from '../utils'; export default { name: 'Sync Name', diff --git a/src/events/handle-member-join.ts b/src/events/handle-member-join.ts index bc302bd..b098248 100644 --- a/src/events/handle-member-join.ts +++ b/src/events/handle-member-join.ts @@ -1,7 +1,6 @@ -import { Guild, GuildMember, GuildTextBasedChannel } from 'discord.js'; +import { GuildMember, GuildTextBasedChannel } from 'discord.js'; import { Database } from '../shared/Database'; -import { config } from '../config'; -import { getE621Alts, userIsBanned } from '../utils'; +import { getE621Alts } from '../utils'; export async function handleMemberJoin(member: GuildMember) { const guildSettings = await Database.getGuildSettings(member.guild.id); diff --git a/src/events/handle-voice-state-update.ts b/src/events/handle-voice-state-update.ts index 921740d..e42f8e3 100644 --- a/src/events/handle-voice-state-update.ts +++ b/src/events/handle-voice-state-update.ts @@ -1,4 +1,4 @@ -import { Guild, GuildMember, GuildTextBasedChannel, time, TimestampStyles, VoiceBasedChannel, VoiceState } from 'discord.js'; +import { Guild, GuildMember, GuildTextBasedChannel, time, VoiceBasedChannel, VoiceState } from 'discord.js'; import { Database } from '../shared/Database'; export async function handleVoiceStateUpdate(oldState: VoiceState, newState: VoiceState) { diff --git a/src/utils/channel-utils.ts b/src/utils/channel-utils.ts index facdfcc..36592de 100644 --- a/src/utils/channel-utils.ts +++ b/src/utils/channel-utils.ts @@ -1,4 +1,4 @@ -import { Channel, GuildBasedChannel, GuildChannel, GuildTextBasedChannel, TextBasedChannel, VoiceBasedChannel } from 'discord.js'; +import { GuildBasedChannel } from 'discord.js'; import { Database } from '../shared/Database'; export async function channelIsInStaffCategory(channel: GuildBasedChannel) { diff --git a/src/utils/e621-utils.ts b/src/utils/e621-utils.ts index 196d6f7..d72060c 100644 --- a/src/utils/e621-utils.ts +++ b/src/utils/e621-utils.ts @@ -1,7 +1,5 @@ -import { Guild } from 'discord.js'; import { config } from '../config'; import { E621Post, E621User, Record } from '../types'; -import { Database } from '../shared/Database'; const BLACKLISTED_TAGS: string[] = []; const BLACKLISTED_NONSAFE_TAGS: string[] = ['young']; diff --git a/src/utils/name-sync.ts b/src/utils/name-sync.ts index 669be7d..ad6894a 100644 --- a/src/utils/name-sync.ts +++ b/src/utils/name-sync.ts @@ -1,8 +1,7 @@ +import { ChatInputCommandInteraction, GuildMember, ModalSubmitInteraction, UserContextMenuCommandInteraction } from 'discord.js'; +import { Database } from '../shared/Database'; import { E621User } from '../types'; import { getE621User } from './e621-utils'; -import { Database } from '../shared/Database'; -import { config } from '../config'; -import { ChatInputCommandInteraction, GuildMember, ModalSubmitInteraction, UserContextMenuCommandInteraction } from 'discord.js'; export async function syncName(interaction: ChatInputCommandInteraction | UserContextMenuCommandInteraction | ModalSubmitInteraction, member: GuildMember, id: number | null) { if (member.roles.highest.comparePositionTo(member.guild.members.me!.roles.highest) > 0) { diff --git a/src/utils/note-utils.ts b/src/utils/note-utils.ts index 53aa23b..806d527 100644 --- a/src/utils/note-utils.ts +++ b/src/utils/note-utils.ts @@ -1,4 +1,4 @@ -import { ActionRowBuilder, APIEmbedField, ButtonBuilder, ButtonStyle, EmbedBuilder, GuildMember, MessageActionRowComponentBuilder, time } from 'discord.js'; +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, time } from 'discord.js'; import { Database } from '../shared/Database'; import { MessageContent, Note } from '../types'; diff --git a/src/utils/record-utils.ts b/src/utils/record-utils.ts index 35807c5..f0f5dff 100644 --- a/src/utils/record-utils.ts +++ b/src/utils/record-utils.ts @@ -1,9 +1,8 @@ -import { ActionRowBuilder, ButtonBuilder, ButtonStyle, Embed, EmbedBuilder, Guild } from 'discord.js'; -import { Database } from '../shared/Database'; -import { E621User, MessageContent, Record, RecordCategory } from '../types'; -import { getE621User, getUserRecords } from './e621-utils'; +import { ActionRowBuilder, ButtonBuilder, ButtonStyle, EmbedBuilder, Guild } from 'discord.js'; import { config } from '../config'; -import { e621IdsFromAltData, comprehensiveAltLookupFromDiscord } from './alt-utils'; +import { E621User, MessageContent, Record, RecordCategory } from '../types'; +import { comprehensiveAltLookupFromDiscord, e621IdsFromAltData } from './alt-utils'; +import { getE621User, getUserRecords } from './e621-utils'; type RecordWithUserData = Record & { user: E621User, creator: E621User, updater: E621User } type AllRecords = RecordWithUserData[];