diff --git a/src/discord/Core.ts b/src/discord/Core.ts index b4f877a..9b2261e 100644 --- a/src/discord/Core.ts +++ b/src/discord/Core.ts @@ -1,5 +1,4 @@ import { Guild } from ".prisma/client"; -import { Message } from "discord.js"; import Logger from "../libs/Logger"; import Cache from "../providers/Cache"; import DiscordProvider from "../providers/Discord"; diff --git a/src/discord/Help.ts b/src/discord/Help.ts index 5481b49..dab2210 100644 --- a/src/discord/Help.ts +++ b/src/discord/Help.ts @@ -1,5 +1,5 @@ import { CommandInteraction, Interaction, Message } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, sendMessageOrInteractionResponse, sendReply, makeInfoEmbed } from "../utils/DiscordMessage"; +import { sendMessageOrInteractionResponse, makeInfoEmbed } from "../utils/DiscordMessage"; import DiscordProvider from "../providers/Discord"; import Cache from "../providers/Cache"; diff --git a/src/discord/InteractionManager.ts b/src/discord/InteractionManager.ts index 89e70de..e275aed 100644 --- a/src/discord/InteractionManager.ts +++ b/src/discord/InteractionManager.ts @@ -1,8 +1,6 @@ import { Message, Interaction, CommandInteraction } from "discord.js"; -import { makeInfoEmbed, makeErrorEmbed, makeSuccessEmbed, makeProcessingEmbed, sendMessageOrInteractionResponse, sendReply } from "../utils/DiscordMessage"; -import DiscordProvider from "../providers/Discord"; +import { makeInfoEmbed, makeErrorEmbed, makeSuccessEmbed, makeProcessingEmbed, sendMessageOrInteractionResponse } from "../utils/DiscordMessage"; import {registerAllGuildsCommands, unregisterAllGuildsCommands} from "../utils/DiscordInteraction"; -import Prisma from "../providers/Prisma"; import Users from "../services/Users"; const EMBEDS = { diff --git a/src/discord/Invite.ts b/src/discord/Invite.ts index 01c9ce7..2b7b49d 100644 --- a/src/discord/Invite.ts +++ b/src/discord/Invite.ts @@ -1,5 +1,5 @@ import { Message, CommandInteraction, Interaction } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../utils/DiscordMessage"; +import { sendMessageOrInteractionResponse, makeInfoEmbed } from "../utils/DiscordMessage"; import DiscordProvider from "../providers/Discord"; import Users from "../services/Users" import Environment from "../providers/Environment"; diff --git a/src/discord/MembershipScreening.ts b/src/discord/MembershipScreening.ts index 1f7e1b6..7160059 100644 --- a/src/discord/MembershipScreening.ts +++ b/src/discord/MembershipScreening.ts @@ -1,6 +1,6 @@ -import { GuildChannel, GuildMember, Message, Permissions, TextChannel, MessageActionRow, MessageButton, Interaction, CommandInteraction, Role, ThreadChannel, MessageEmbedFooter } from "discord.js"; +import { GuildChannel, GuildMember, Message, Permissions, TextChannel, MessageActionRow, MessageButton, Interaction, CommandInteraction, Role, ThreadChannel } from "discord.js"; import App from ".."; -import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, makeInfoEmbed, makeErrorEmbed, sendMessage, sendReply, sendMessageOrInteractionResponse } from "../utils/DiscordMessage"; +import { makeSuccessEmbed, makeInfoEmbed, makeErrorEmbed, sendMessageOrInteractionResponse } from "../utils/DiscordMessage"; import Logger from "../libs/Logger"; import DiscordProvider from "../providers/Discord"; import Prisma from "../providers/Prisma"; diff --git a/src/discord/MusicPlayer/Join.ts b/src/discord/MusicPlayer/Join.ts index 0f5b7e7..69735ab 100644 --- a/src/discord/MusicPlayer/Join.ts +++ b/src/discord/MusicPlayer/Join.ts @@ -1,10 +1,7 @@ -import { Message, CommandInteraction, Interaction, VoiceChannel, Permissions, GuildMember, DMChannel, StageChannel, MessageActionRow, MessageButton, MessageAttachment, TextChannel } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeErrorEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; +import { Message, CommandInteraction, Interaction, VoiceChannel, Permissions, GuildMember, DMChannel, StageChannel, MessageActionRow, MessageButton, TextChannel } from "discord.js"; +import { makeSuccessEmbed, makeErrorEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; import DiscordProvider from "../../providers/Discord"; -import Users from "../../services/Users" -import Environment from "../../providers/Environment"; import DiscordMusicPlayer, { PlayerPlayingEvent, PlayerErrorEvent, VoiceDisconnectedEvent, ValidTracks, DiscordMusicPlayerInstance } from "../../providers/DiscordMusicPlayer"; -import Discord from "../../providers/Discord"; const EMBEDS = { VOICECHANNEL_JOINED: (data: Message | Interaction) => { diff --git a/src/discord/MusicPlayer/Leave.ts b/src/discord/MusicPlayer/Leave.ts index be8645f..4071365 100644 --- a/src/discord/MusicPlayer/Leave.ts +++ b/src/discord/MusicPlayer/Leave.ts @@ -1,9 +1,7 @@ -import { Message, CommandInteraction, Interaction, VoiceChannel } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeErrorEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; +import { Message, CommandInteraction, Interaction } from "discord.js"; +import { makeSuccessEmbed, makeErrorEmbed, sendMessageOrInteractionResponse } from "../../utils/DiscordMessage"; import DiscordProvider from "../../providers/Discord"; -import Users from "../../services/Users" -import Environment from "../../providers/Environment"; -import DiscordMusicPlayer, { DiscordMusicPlayerInstance } from "../../providers/DiscordMusicPlayer"; +import DiscordMusicPlayer from "../../providers/DiscordMusicPlayer"; const EMBEDS = { VOICECHANNEL_LEFT: (data: Message | Interaction) => { diff --git a/src/discord/MusicPlayer/NowPlaying.ts b/src/discord/MusicPlayer/NowPlaying.ts index 7e8a3fb..afe231f 100644 --- a/src/discord/MusicPlayer/NowPlaying.ts +++ b/src/discord/MusicPlayer/NowPlaying.ts @@ -1,9 +1,7 @@ import { Message, CommandInteraction, Interaction, MessageActionRow, TextChannel, MessageButton } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeErrorEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; +import { makeErrorEmbed, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; import DiscordProvider from "../../providers/Discord"; -import Users from "../../services/Users" -import Environment from "../../providers/Environment"; -import DiscordMusicPlayer, { DiscordMusicPlayerInstance, ValidTracks, Queue } from "../../providers/DiscordMusicPlayer"; +import DiscordMusicPlayer, { ValidTracks } from "../../providers/DiscordMusicPlayer"; const EMBEDS = { NOW_PLAYING: (data: Message | Interaction, track: ValidTracks) => { diff --git a/src/discord/MusicPlayer/Play.ts b/src/discord/MusicPlayer/Play.ts index 417033f..2b0ee79 100644 --- a/src/discord/MusicPlayer/Play.ts +++ b/src/discord/MusicPlayer/Play.ts @@ -1,7 +1,6 @@ -import { Message, CommandInteraction, Interaction, VoiceChannel, MessageActionRow, Permissions, MessageButton, TextChannel } from "discord.js"; -import { makeErrorEmbed, makeSuccessEmbed, makeProcessingEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; +import { Message, CommandInteraction, Interaction, VoiceChannel, MessageActionRow, MessageButton, TextChannel } from "discord.js"; +import { makeErrorEmbed, makeSuccessEmbed, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; import DiscordProvider from "../../providers/Discord"; -import Environment from "../../providers/Environment"; import DiscordMusicPlayer, { ValidTracks } from "../../providers/DiscordMusicPlayer"; import { joinVoiceChannelProcedure } from "./Join"; diff --git a/src/discord/MusicPlayer/Queue.ts b/src/discord/MusicPlayer/Queue.ts index 8b6d8dc..33a39b8 100644 --- a/src/discord/MusicPlayer/Queue.ts +++ b/src/discord/MusicPlayer/Queue.ts @@ -1,9 +1,7 @@ -import { Message, CommandInteraction, Interaction, VoiceChannel, TextChannel } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeErrorEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; -import DiscordProvider from "../../providers/Discord"; -import Users from "../../services/Users" -import Environment from "../../providers/Environment"; -import DiscordMusicPlayer, { DiscordMusicPlayerInstance, ValidTracks, Queue } from "../../providers/DiscordMusicPlayer"; +import { Message, CommandInteraction, Interaction, TextChannel } from "discord.js"; +import { makeErrorEmbed, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; + +import DiscordMusicPlayer, { Queue } from "../../providers/DiscordMusicPlayer"; const EMBEDS = { QUEUE: (data: Message | Interaction, queue: Queue) => { diff --git a/src/discord/MusicPlayer/Search.ts b/src/discord/MusicPlayer/Search.ts index fc21627..f172222 100644 --- a/src/discord/MusicPlayer/Search.ts +++ b/src/discord/MusicPlayer/Search.ts @@ -1,9 +1,6 @@ -import { Message, CommandInteraction, Interaction, VoiceChannel, MessageActionRow, DMChannel, TextChannel, MessageSelectMenu, MessageSelectOptionData, GuildMember } from "discord.js"; -import { makeErrorEmbed, makeSuccessEmbed, makeProcessingEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; -import DiscordProvider from "../../providers/Discord"; -import Environment from "../../providers/Environment"; +import { Message, CommandInteraction, Interaction, MessageActionRow, TextChannel, MessageSelectMenu, MessageSelectOptionData } from "discord.js"; +import { makeErrorEmbed, makeSuccessEmbed, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; import DiscordMusicPlayer, { ValidTracks } from "../../providers/DiscordMusicPlayer"; -import Prisma from "../../providers/Prisma"; import { joinVoiceChannelProcedure } from "./Join"; const EMBEDS = { diff --git a/src/discord/MusicPlayer/Skip.ts b/src/discord/MusicPlayer/Skip.ts index d72a94a..a24188c 100644 --- a/src/discord/MusicPlayer/Skip.ts +++ b/src/discord/MusicPlayer/Skip.ts @@ -1,8 +1,6 @@ -import { Message, CommandInteraction, Interaction, VoiceChannel } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeErrorEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../../utils/DiscordMessage"; +import { Message, CommandInteraction, Interaction } from "discord.js"; +import { makeSuccessEmbed, makeErrorEmbed, sendMessageOrInteractionResponse } from "../../utils/DiscordMessage"; import DiscordProvider from "../../providers/Discord"; -import Users from "../../services/Users" -import Environment from "../../providers/Environment"; import DiscordMusicPlayer from "../../providers/DiscordMusicPlayer"; const EMBEDS = { diff --git a/src/discord/Ping.ts b/src/discord/Ping.ts index 4e52526..f916bae 100644 --- a/src/discord/Ping.ts +++ b/src/discord/Ping.ts @@ -2,9 +2,8 @@ import { CommandInteraction, Message, Interaction } from "discord.js"; import { makeSuccessEmbed, makeProcessingEmbed, sendMessageOrInteractionResponse } from "../utils/DiscordMessage"; import DiscordProvider from "../providers/Discord"; import NodePing from "ping"; -import { Promise, reject } from "bluebird"; +import { Promise } from "bluebird"; import os from "os"; -import Logger from "../libs/Logger"; import Environment from "../providers/Environment"; import Configuration from "../providers/Configuration"; diff --git a/src/discord/Say.ts b/src/discord/Say.ts index afc4019..19f8bd5 100644 --- a/src/discord/Say.ts +++ b/src/discord/Say.ts @@ -1,6 +1,5 @@ import { Message, Permissions, Interaction, CommandInteraction } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, sendMessageOrInteractionResponse, sendReply, makeErrorEmbed, makeInfoEmbed } from "../utils/DiscordMessage"; -import DiscordProvider from "../providers/Discord"; +import { makeSuccessEmbed, sendMessageOrInteractionResponse, makeErrorEmbed, makeInfoEmbed } from "../utils/DiscordMessage"; const EMBEDS = { SAY_INFO: (data: Message | Interaction) => { diff --git a/src/discord/Settings.ts b/src/discord/Settings.ts index 024378e..2807c11 100644 --- a/src/discord/Settings.ts +++ b/src/discord/Settings.ts @@ -1,9 +1,7 @@ import { Message, Interaction, CommandInteraction, Permissions, ThreadChannel, GuildChannel } from "discord.js"; -import { makeInfoEmbed, makeErrorEmbed, makeSuccessEmbed, makeProcessingEmbed, sendMessageOrInteractionResponse, sendReply } from "../utils/DiscordMessage"; +import { makeInfoEmbed, makeErrorEmbed, makeSuccessEmbed, makeProcessingEmbed, sendMessageOrInteractionResponse } from "../utils/DiscordMessage"; import DiscordProvider from "../providers/Discord"; -import {registerAllGuildsCommands, unregisterAllGuildsCommands} from "../utils/DiscordInteraction"; import Prisma from "../providers/Prisma"; -import Users from "../services/Users"; import Cache from "../providers/Cache"; const EMBEDS = { diff --git a/src/discord/Stats.ts b/src/discord/Stats.ts index 673eb28..1c415d1 100644 --- a/src/discord/Stats.ts +++ b/src/discord/Stats.ts @@ -1,8 +1,6 @@ import { Message, CommandInteraction, Interaction } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, sendMessage, sendMessageOrInteractionResponse, makeInfoEmbed } from "../utils/DiscordMessage"; +import { sendMessageOrInteractionResponse, makeInfoEmbed } from "../utils/DiscordMessage"; import DiscordProvider from "../providers/Discord"; -import Users from "../services/Users" -import Environment from "../providers/Environment"; import os from "os-utils"; const EMBEDS = { diff --git a/src/discord/UserInfo.ts b/src/discord/UserInfo.ts index dd4636c..b3fdd3c 100644 --- a/src/discord/UserInfo.ts +++ b/src/discord/UserInfo.ts @@ -1,6 +1,5 @@ -import { Message, Permissions, Interaction, CommandInteraction } from "discord.js"; -import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, sendMessageOrInteractionResponse, sendReply, makeErrorEmbed, makeInfoEmbed } from "../utils/DiscordMessage"; -import DiscordProvider from "../providers/Discord"; +import { Message, Interaction, CommandInteraction } from "discord.js"; +import { sendMessageOrInteractionResponse, makeErrorEmbed, makeInfoEmbed } from "../utils/DiscordMessage"; import { getColorFromURL } from "color-thief-node"; const EMBEDS = { diff --git a/src/discord/developer/FakeError.ts b/src/discord/developer/FakeError.ts index 48ff4ee..3d73c97 100644 --- a/src/discord/developer/FakeError.ts +++ b/src/discord/developer/FakeError.ts @@ -1,11 +1,8 @@ -import { Message, MessageEmbed, Interaction, CommandInteraction, TextChannel } from "discord.js"; -import { makeInfoEmbed, makeErrorEmbed, makeSuccessEmbed, makeProcessingEmbed, makeWarningEmbed, sendMessageOrInteractionResponse, sendMessage } from "../../utils/DiscordMessage"; -import DiscordProvider from "../../providers/Discord"; -import { registerAllGuildsCommands, unregisterAllGuildsCommands } from "../../utils/DiscordInteraction"; +import { Message, Interaction, CommandInteraction } from "discord.js"; +import { makeInfoEmbed, makeErrorEmbed, sendMessageOrInteractionResponse } from "../../utils/DiscordMessage"; import DiscordMusicPlayer from "../../providers/DiscordMusicPlayer"; import Users from "../../services/Users"; - const EMBEDS = { FAKEERROR_INFO: (data: Message | Interaction) => { return makeInfoEmbed({ diff --git a/src/discord/developer/ServiceAnnouncement.ts b/src/discord/developer/ServiceAnnouncement.ts index 31ea1e2..9b71d0f 100644 --- a/src/discord/developer/ServiceAnnouncement.ts +++ b/src/discord/developer/ServiceAnnouncement.ts @@ -1,11 +1,10 @@ import { Message, MessageEmbed, Interaction, CommandInteraction, TextChannel } from "discord.js"; import { makeInfoEmbed, makeErrorEmbed, makeSuccessEmbed, makeProcessingEmbed, makeWarningEmbed, sendMessageOrInteractionResponse, sendMessage } from "../../utils/DiscordMessage"; import DiscordProvider from "../../providers/Discord"; -import { registerAllGuildsCommands, unregisterAllGuildsCommands } from "../../utils/DiscordInteraction"; import Prisma from "../../providers/Prisma"; import Users from "../../services/Users"; -import { Promise, reject } from "bluebird"; +import { Promise } from "bluebird"; import fs from "fs"; import path from "path"; import Logger from "../../libs/Logger"; diff --git a/src/discord/osu.ts b/src/discord/osu.ts index fef9208..98bfc71 100644 --- a/src/discord/osu.ts +++ b/src/discord/osu.ts @@ -1,11 +1,8 @@ -import { GuildChannel, GuildMember, Message, Permissions, TextChannel, MessageActionRow, MessageButton, Interaction, CommandInteraction, Role, ThreadChannel } from "discord.js"; -import App from ".."; -import { getEmotes, makeSuccessEmbed, makeProcessingEmbed, makeInfoEmbed, makeErrorEmbed, sendMessage, sendReply, sendMessageOrInteractionResponse } from "../utils/DiscordMessage"; -import Logger from "../libs/Logger"; -import DiscordProvider from "../providers/Discord"; +import { Message, MessageActionRow, MessageButton, Interaction, CommandInteraction } from "discord.js"; +import { makeInfoEmbed, makeErrorEmbed, sendMessageOrInteractionResponse } from "../utils/DiscordMessage"; import Prisma from "../providers/Prisma"; import osuAPI from "../providers/osuAPI"; -import { countryCodeEmoji, emojiCountryCode } from "country-code-emoji"; +import { countryCodeEmoji } from "country-code-emoji"; import countryLookup from "country-code-lookup"; import validator from 'validator'; diff --git a/src/exception/NativeException.ts b/src/exception/NativeException.ts index 83a2cbf..0587b3f 100644 --- a/src/exception/NativeException.ts +++ b/src/exception/NativeException.ts @@ -4,7 +4,6 @@ import App from '../providers/App'; class NativeException { - public process (): void { process.on('uncaughtException', exception => { @@ -20,8 +19,6 @@ class NativeException { }); } - - } export default new NativeException; \ No newline at end of file diff --git a/src/providers/Configuration.ts b/src/providers/Configuration.ts index 8a59f9f..e4170bc 100644 --- a/src/providers/Configuration.ts +++ b/src/providers/Configuration.ts @@ -1,8 +1,6 @@ import fs from "fs"; import path from "path"; -import Logger from "../libs/Logger"; - const ConfigurationData: any = []; class Configuration { diff --git a/src/providers/DiscordMusicPlayer.ts b/src/providers/DiscordMusicPlayer.ts index 54cdf29..e68a9be 100644 --- a/src/providers/DiscordMusicPlayer.ts +++ b/src/providers/DiscordMusicPlayer.ts @@ -1,6 +1,6 @@ -import playdl, { YouTubeVideo, InfoData } from "play-dl"; -import { Message, VoiceChannel, Snowflake, TextChannel, StageChannel, Guild } from "discord.js"; -import { AudioPlayer, VoiceConnection, createAudioPlayer, joinVoiceChannel, createAudioResource, StreamType, VoiceConnectionStatus, AudioPlayerStatus, NoSubscriberBehavior, VoiceConnectionDestroyedState, VoiceConnectionState, DiscordGatewayAdapterCreator, AudioResource, AudioPlayerError } from "@discordjs/voice"; +import playdl, { YouTubeVideo } from "play-dl"; +import { VoiceChannel, Snowflake, TextChannel, StageChannel, Guild } from "discord.js"; +import { AudioPlayer, VoiceConnection, createAudioPlayer, joinVoiceChannel, createAudioResource, VoiceConnectionStatus, AudioPlayerStatus, NoSubscriberBehavior, VoiceConnectionState, AudioPlayerError } from "@discordjs/voice"; import { EventEmitter } from "stream"; import DiscordProvider from "./Discord"; diff --git a/src/providers/Environment.ts b/src/providers/Environment.ts index a9e1c11..ae0439c 100644 --- a/src/providers/Environment.ts +++ b/src/providers/Environment.ts @@ -1,8 +1,6 @@ import * as path from "path"; import * as dotenv from "dotenv"; -import Validator from "validator"; - import Logger from "../libs/Logger"; const requiredENV = [ diff --git a/src/utils/DiscordInteraction.ts b/src/utils/DiscordInteraction.ts index b9af9f5..1694980 100644 --- a/src/utils/DiscordInteraction.ts +++ b/src/utils/DiscordInteraction.ts @@ -1,6 +1,5 @@ import Logger from "../libs/Logger"; import DiscordProvider from "../providers/Discord"; -import { ApplicationCommand, Collection } from "discord.js" import { SlashCommandBuilder } from "@discordjs/builders"; export const GLOBAL_COMMANDS: Object[] = [];