Remove unused imports

This commit is contained in:
Tarrgon
2025-09-14 08:05:59 -04:00
parent 672a508d9d
commit f6e83b3710
20 changed files with 34 additions and 37 deletions
+1 -1
View File
@@ -1,4 +1,4 @@
import { ActionRowBuilder, ButtonInteraction, Client, ModalBuilder, TextInputBuilder, TextInputStyle, MessageFlags, ChannelType, PermissionFlagsBits, ButtonBuilder, ButtonStyle } from 'discord.js';
import { ActionRowBuilder, ButtonBuilder, ButtonInteraction, ButtonStyle, ChannelType, Client, MessageFlags, PermissionFlagsBits } from 'discord.js';
import { Database } from '../shared/Database';
export default {
+1 -1
View File
@@ -1,4 +1,4 @@
import { ActionRowBuilder, ButtonInteraction, Client, ModalBuilder, TextInputBuilder, TextInputStyle, MessageFlags, ChannelType, ButtonBuilder, ButtonStyle } from 'discord.js';
import { ButtonInteraction, Client, MessageFlags, ChannelType } from 'discord.js';
import { Database } from '../shared/Database';
export default {
+1 -1
View File
@@ -1,4 +1,4 @@
import { ActionRowBuilder, ButtonInteraction, Client, ModalBuilder, TextInputBuilder, TextInputStyle, MessageFlags } from 'discord.js';
import { ButtonInteraction, Client, MessageFlags } from 'discord.js';
import { Database } from '../shared/Database';
export default {
+1 -1
View File
@@ -1,4 +1,4 @@
import { ActionRowBuilder, ButtonInteraction, Client, ModalBuilder, TextInputBuilder, TextInputStyle, MessageFlags, ChannelType, PermissionFlagsBits, ButtonBuilder, ButtonStyle } from 'discord.js';
import { ActionRowBuilder, ButtonBuilder, ButtonInteraction, ButtonStyle, ChannelType, Client, MessageFlags, PermissionFlagsBits } from 'discord.js';
import { Database } from '../shared/Database';
export default {
+2 -3
View File
@@ -1,7 +1,6 @@
import { ApplicationIntegrationType, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, GuildMember, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder, time, TimestampStyles } from 'discord.js';
import { channelIsInStaffCategory, deferInteraction, handleWhoIsInteraction } from '../utils';
import { getRecordMessageFromDiscordId } from '../utils/record-utils';
import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, GuildMember, InteractionContextType, MessageMentions, PermissionFlagsBits, SlashCommandBuilder, time, TimestampStyles } from 'discord.js';
import { Database } from '../shared/Database';
import { deferInteraction } from '../utils';
const mentionRegex = new RegExp(MessageMentions.UsersPattern);
+1 -2
View File
@@ -1,5 +1,4 @@
import { ApplicationIntegrationType, AutocompleteInteraction, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, GuildMember, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder, time, TimestampStyles } from 'discord.js';
import { deferInteraction } from '../utils';
import { ApplicationIntegrationType, AutocompleteInteraction, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
import { Database } from '../shared/Database';
import { KnowledgebaseItem } from '../types';
+2 -2
View File
@@ -1,7 +1,7 @@
import { ApplicationIntegrationType, AutocompleteInteraction, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, GuildMember, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder, time, TimestampStyles } from 'discord.js';
import { deferInteraction } from '../utils';
import { ApplicationIntegrationType, AutocompleteInteraction, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
import { Database } from '../shared/Database';
import { KnowledgebaseItem } from '../types';
import { deferInteraction } from '../utils';
export default {
name: 'knowledgebase',
+3 -3
View File
@@ -1,7 +1,7 @@
import { ApplicationIntegrationType, BitFieldResolvable, ChatInputCommandInteraction, Client, GuildBasedChannel, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder, User } from 'discord.js';
import { channelIsInStaffCategory, handleWhoIsInteraction, logCustomEvent, resolveUser } from '../utils';
import { Database } from '../shared/Database';
import { ApplicationIntegrationType, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
import { config } from '../config';
import { Database } from '../shared/Database';
import { logCustomEvent, resolveUser } from '../utils';
const mentionRegex = new RegExp(MessageMentions.UsersPattern);
+2 -2
View File
@@ -1,6 +1,6 @@
import { ApplicationCommandOptionType, ApplicationIntegrationType, AutocompleteInteraction, ChatInputCommandInteraction, Client, GuildBasedChannel, InteractionContextType, MessageFlags, MessageMentions, PermissionFlagsBits, SlashCommandBuilder, User } from 'discord.js';
import { ApplicationIntegrationType, AutocompleteInteraction, ChatInputCommandInteraction, Client, InteractionContextType, MessageMentions, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
import { Database } from '../shared/Database';
import { channelIsInStaffCategory, deferInteraction, logCustomEvent, resolveUser } from '../utils';
import { deferInteraction, logCustomEvent, resolveUser } from '../utils';
import { getNoteMessage } from '../utils/note-utils';
const mentionRegex = new RegExp(MessageMentions.UsersPattern);
+2 -3
View File
@@ -1,8 +1,7 @@
import { ApplicationIntegrationType, AutocompleteInteraction, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder, User } from 'discord.js';
import { ApplicationIntegrationType, AutocompleteInteraction, ChatInputCommandInteraction, Client, InteractionContextType, PermissionFlagsBits, SlashCommandBuilder, User } from 'discord.js';
import { Database } from '../shared/Database';
import { getE621User, logCustomEvent } from '../utils';
import { config } from '../config';
import { TicketPhrase } from '../types';
import { logCustomEvent } from '../utils';
const MIN_PHRASE_LENGTH = 1;
const MAX_PHRASE_LENGTH = 512;
+1 -1
View File
@@ -1,4 +1,4 @@
import { ActionRow, ActionRowBuilder, ApplicationIntegrationType, ButtonBuilder, ButtonStyle, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, RateLimitError, SlashCommandBuilder } from 'discord.js';
import { ActionRowBuilder, ApplicationIntegrationType, ButtonBuilder, ButtonStyle, ChatInputCommandInteraction, Client, InteractionContextType, MessageFlags, PermissionFlagsBits, SlashCommandBuilder } from 'discord.js';
export default {
name: 'private-help',
+2 -2
View File
@@ -1,6 +1,6 @@
import { APIEmbedField, APIRole, AuditLogChange, AuditLogEvent, EmbedBuilder, EmbedField, Guild, GuildAuditLogsEntry, PermissionsBitField, Role, RoleFlags, SlashCommandSubcommandGroupBuilder, SnowflakeUtil } from 'discord.js';
import { formatChanges, formatExtras, formatSnowflake, getTargetType } from '../utils';
import { APIEmbedField, APIRole, AuditLogEvent, EmbedBuilder, Guild, GuildAuditLogsEntry, RoleFlags, SnowflakeUtil } from 'discord.js';
import { Database } from '../shared/Database';
import { formatChanges, formatExtras, formatSnowflake, getTargetType } from '../utils';
const IGNORED_ACTIONS = [
AuditLogEvent.MemberMove,
+2 -2
View File
@@ -1,7 +1,7 @@
import { AllowedMentionsTypes, Message as DiscordMessage, GuildBasedChannel, GuildTextBasedChannel, OmitPartialGroupDMChannel, PartialMessage, ReadonlyCollection, spoiler } from 'discord.js';
import { Message as DiscordMessage, GuildBasedChannel, GuildTextBasedChannel, OmitPartialGroupDMChannel, PartialMessage, ReadonlyCollection, spoiler } from 'discord.js';
import { config } from '../config';
import { E621Post } from '../types';
import { Database } from '../shared/Database';
import { E621Post } from '../types';
import { ALLOWED_MIMETYPES, blipIDRegex, calculateMD5FromURL, channelIgnoresLinks, channelIsInStaffCategory, channelIsSafe, commentIDRegex, forumTopicIDRegex, getE621Post, getE621PostByMd5, getPostUrl, isEdited, isInSpoilerTags, logDeletion, logEdit, poolIDRegex, PostAction, postIDRegex, recordIDRegex, searchLinkRegex, setIDRegex, spoilerOrBlacklist, takedownIDRegex, ticketIDRegex, userIDRegex, wikiLinkRegex } from '../utils';
export type Message<InGuild extends boolean = boolean> = OmitPartialGroupDMChannel<DiscordMessage<InGuild>>;
+4 -4
View File
@@ -1,12 +1,12 @@
import { Client as DiscordClient, GatewayIntentBits, MessageFlags, Partials } from 'discord.js';
import 'source-map-support/register';
import { Client as DiscordClient, GatewayIntentBits, Guild, MessageFlags, Partials } from 'discord.js';
import { config } from './config';
import { handleAuditLogCreate, handleBanRemove, handleBulkMessageDelete, handleGuildCreate, handleMemberJoin, handleMessageCreate, handleMessageDelete, handleMessageUpdate, handleThreadCreate, handleVoiceStateUpdate } from './events';
import { Database } from './shared/Database';
import { openRedisClient } from './shared/RedisClient';
import { Handler } from './types';
import { checkExpiredBans, initIfNecessary, loadHandlersFrom, refreshCommands } from './utils';
import { initializeWebserver } from './webserver';
import { Database } from './shared/Database';
import { handleAuditLogCreate, handleBanRemove, handleBulkMessageDelete, handleGuildCreate, handleMemberJoin, handleMessageCreate, handleMessageDelete, handleMessageUpdate, handleThreadCreate, handleVoiceStateUpdate } from './events';
import { openRedisClient } from './shared/RedisClient';
let ready = false;
+1 -1
View File
@@ -1,4 +1,4 @@
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, GuildTextBasedChannel, MessageFlags, ModalSubmitInteraction, TextChannel, ThreadAutoArchiveDuration } from 'discord.js';
import { Client, MessageFlags, ModalSubmitInteraction } from 'discord.js';
import { Database } from '../shared/Database';
import { logCustomEvent } from '../utils';
+1 -1
View File
@@ -1,4 +1,4 @@
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, GuildTextBasedChannel, MessageFlags, ModalSubmitInteraction, TextChannel, ThreadAutoArchiveDuration } from 'discord.js';
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, MessageFlags, ModalSubmitInteraction, TextChannel, ThreadAutoArchiveDuration } from 'discord.js';
import { Database } from '../shared/Database';
export default {
+2 -3
View File
@@ -1,7 +1,6 @@
import { ActionRowBuilder, ButtonBuilder, ButtonStyle, ChannelType, Client, GuildTextBasedChannel, MessageFlags, ModalSubmitInteraction, TextChannel, ThreadAutoArchiveDuration } from 'discord.js';
import { Database } from '../shared/Database';
import { deferInteraction, logCustomEvent, syncName } from '../utils';
import { Client, ModalSubmitInteraction } from 'discord.js';
import { config } from '../config';
import { deferInteraction, syncName } from '../utils';
export default {
name: 'sync-name-modal',
+1 -1
View File
@@ -1,4 +1,4 @@
import { AuditLogChange, AuditLogEvent, AuditLogOptionsType, GuildAuditLogsEntry, APIRole, time, TimestampStyles, PermissionsBitField, PermissionsString, Guild } from 'discord.js';
import { AuditLogChange, AuditLogEvent, Guild, GuildAuditLogsEntry, PermissionsBitField, PermissionsString, time, TimestampStyles } from 'discord.js';
import { ApplicationCommandPermissionChangeLog, PermissionsChangeLog, PinExtras, RoleChangeLog, TimeoutChangeLog } from '../types';
import { getArrayDifference } from './array-utils';
+3 -3
View File
@@ -1,9 +1,9 @@
import { APIEmbedField, AttachmentBuilder, Channel, EmbedBuilder, Guild, GuildBasedChannel, GuildTextBasedChannel, MessageCreateOptions, messageLink, TextBasedChannel } from 'discord.js';
import { Database } from '../shared/Database';
import { APIEmbedField, AttachmentBuilder, EmbedBuilder, Guild, GuildBasedChannel, GuildTextBasedChannel, MessageCreateOptions } from 'discord.js';
import { Message } from '../events';
import { deserializeMessagePart, getModifiedAttachments, getModifiedStickers } from './message-utils';
import { Database } from '../shared/Database';
import { LoggedMessage } from '../types';
import { channelIsInStaffCategory } from './channel-utils';
import { deserializeMessagePart, getModifiedAttachments, getModifiedStickers } from './message-utils';
type CustomEventLogData = {
title: string