diff --git a/src/events/buttons/staffapply.ts b/src/events/buttons/staffapply.ts index 8b7b937..9128b5a 100644 --- a/src/events/buttons/staffapply.ts +++ b/src/events/buttons/staffapply.ts @@ -52,7 +52,9 @@ export = { } if (!userRoles.has(guildRole)) { - await interaction.editReply("You must be a member of the guild to apply for staff.") + await interaction.editReply( + "You must be a member of the guild to apply for staff.", + ) return } diff --git a/src/events/cron/weeklyGexp.ts b/src/events/cron/weeklyGexp.ts index 74d70b8..6d7a138 100644 --- a/src/events/cron/weeklyGexp.ts +++ b/src/events/cron/weeklyGexp.ts @@ -2,7 +2,7 @@ import { hypixelGuildID, guildLogChannel, color, - devMessage + devMessage, } from "../../../config/options.json" import { getGuild, getIGN } from "../../utils/Hypixel" import { Cron, GuildData } from "../../interfaces" @@ -23,10 +23,12 @@ async function guildWeekly() { const embedColor = Number(color.replace("#", "0x")) const message = await channel.send({ - embeds: [{ - description: "Starting to fetch guild data...", - color: embedColor - }] + embeds: [ + { + description: "Starting to fetch guild data...", + color: embedColor, + }, + ], }) const guild = (await getGuild(hypixelGuildID, "id")) as GuildData diff --git a/src/interfaces/Cron.ts b/src/interfaces/Cron.ts index f456337..478fd3e 100644 --- a/src/interfaces/Cron.ts +++ b/src/interfaces/Cron.ts @@ -16,4 +16,4 @@ export default interface Cron { onComplete?: null | undefined start?: boolean | null | undefined timeZone: keyof TimeZones -} \ No newline at end of file +} diff --git a/src/interfaces/TimeZones.ts b/src/interfaces/TimeZones.ts index 2f3be7c..807e591 100644 --- a/src/interfaces/TimeZones.ts +++ b/src/interfaces/TimeZones.ts @@ -427,4 +427,4 @@ export default interface TimeZones { "Pacific/Truk": string "Pacific/Wake": string "Pacific/Wallis": string -} \ No newline at end of file +} diff --git a/src/typings/Types.ts b/src/typings/Types.ts index d6709bc..abdf3b8 100644 --- a/src/typings/Types.ts +++ b/src/typings/Types.ts @@ -14,4 +14,4 @@ export type Profile2 = { } } -export type FileType = "js" | "ts" \ No newline at end of file +export type FileType = "js" | "ts" diff --git a/src/typings/index.ts b/src/typings/index.ts index 38c8e08..269797c 100644 --- a/src/typings/index.ts +++ b/src/typings/index.ts @@ -1,3 +1,3 @@ import { Profile, Profile2, FileType } from "./Types" -export { Profile, Profile2, FileType } \ No newline at end of file +export { Profile, Profile2, FileType } diff --git a/src/utils/Autodeploy.ts b/src/utils/Autodeploy.ts index 14e83e8..36bd2e6 100644 --- a/src/utils/Autodeploy.ts +++ b/src/utils/Autodeploy.ts @@ -16,11 +16,19 @@ async function autoDeployCommands(fileType: FileType) { let contentMenuCommands: string[] = [] if (fileType === "js") { - commandFiles = fs.readdirSync("./dist/src/commands/").filter(file => file.endsWith(fileType)) - contentMenuCommands = fs.readdirSync("./dist/src/commands-contextmenu/").filter(file => file.endsWith(fileType)) + commandFiles = fs + .readdirSync("./dist/src/commands/") + .filter(file => file.endsWith(fileType)) + contentMenuCommands = fs + .readdirSync("./dist/src/commands-contextmenu/") + .filter(file => file.endsWith(fileType)) } else if (fileType === "ts") { - commandFiles = fs.readdirSync("./src/commands/").filter(file => file.endsWith(fileType)) - contentMenuCommands = fs.readdirSync("./src/commands-contextmenu/").filter(file => file.endsWith(fileType)) + commandFiles = fs + .readdirSync("./src/commands/") + .filter(file => file.endsWith(fileType)) + contentMenuCommands = fs + .readdirSync("./src/commands-contextmenu/") + .filter(file => file.endsWith(fileType)) } for (const file of commandFiles) { @@ -86,10 +94,7 @@ async function autoDeployCommands(fileType: FileType) { try { console.log( - color.colorize( - "Commands are different, starting deploy.", - "red", - ), + color.colorize("Commands are different, starting deploy.", "red"), ) console.log(color.colorize(currentCmds, "red")) console.log( @@ -97,10 +102,7 @@ async function autoDeployCommands(fileType: FileType) { ) const data = (await rest.put( - Routes.applicationGuildCommands( - env.dev.devid!, - env.dev.guildid!, - ), + Routes.applicationGuildCommands(env.dev.devid!, env.dev.guildid!), { body: commands }, )) as RESTPutAPIApplicationGuildCommandsJSONBody[] diff --git a/src/utils/Client.ts b/src/utils/Client.ts index 947ef9b..ff81027 100644 --- a/src/utils/Client.ts +++ b/src/utils/Client.ts @@ -35,7 +35,6 @@ export class ExtendedClient extends Client { } async start() { - let token: string if (process.env.NODE_ENV === "dev" && process.env.TYPESCRIPT) { console.log("Running in development mode. [ts-node]") diff --git a/src/utils/Illegitimate.ts b/src/utils/Illegitimate.ts index d9c83c9..8400c53 100644 --- a/src/utils/Illegitimate.ts +++ b/src/utils/Illegitimate.ts @@ -23,4 +23,4 @@ class Bot { } } -export default { Bot, client, redis } \ No newline at end of file +export default { Bot, client, redis } diff --git a/src/utils/Init.ts b/src/utils/Init.ts index df1a4ab..658e115 100644 --- a/src/utils/Init.ts +++ b/src/utils/Init.ts @@ -17,5 +17,4 @@ export default function init() { if (!value) throw new Error(`No ${key} specified`) } } - } diff --git a/src/utils/eventHandlers/autocomplete.ts b/src/utils/eventHandlers/autocomplete.ts index 1bbe403..1da0bd7 100644 --- a/src/utils/eventHandlers/autocomplete.ts +++ b/src/utils/eventHandlers/autocomplete.ts @@ -52,4 +52,4 @@ export default function loadAutocompleteEvents(client: Client, ft: FileType) { console.error(error) } }) -} \ No newline at end of file +} diff --git a/src/utils/eventHandlers/button.ts b/src/utils/eventHandlers/button.ts index 1ce9ae9..28ec0e8 100644 --- a/src/utils/eventHandlers/button.ts +++ b/src/utils/eventHandlers/button.ts @@ -7,9 +7,7 @@ import { FileType } from "../../typings" export default function loadButtonEvents(client: Client, ft: FileType) { const btnPath = path.join(__dirname, "..", "..", "events", "buttons") - const btnFiles = fs - .readdirSync(btnPath) - .filter(file => file.endsWith(ft)) + const btnFiles = fs.readdirSync(btnPath).filter(file => file.endsWith(ft)) for (const file of btnFiles) { const filePath = path.join(btnPath, file) @@ -46,4 +44,4 @@ export default function loadButtonEvents(client: Client, ft: FileType) { }) } }) -} \ No newline at end of file +} diff --git a/src/utils/eventHandlers/command.ts b/src/utils/eventHandlers/command.ts index 6aa045b..75c346d 100644 --- a/src/utils/eventHandlers/command.ts +++ b/src/utils/eventHandlers/command.ts @@ -7,7 +7,7 @@ import { FileType } from "../../typings" export default function loadSlashCommandsEvents(client: Client, ft: FileType) { const cmdPath = path.join(__dirname, "..", "..", "commands") - const cmdFiles = fs .readdirSync(cmdPath) .filter(file => file.endsWith(ft)) + const cmdFiles = fs.readdirSync(cmdPath).filter(file => file.endsWith(ft)) for (const file of cmdFiles) { const filePath = path.join(cmdPath, file) @@ -45,4 +45,4 @@ export default function loadSlashCommandsEvents(client: Client, ft: FileType) { }) } }) -} \ No newline at end of file +} diff --git a/src/utils/eventHandlers/contextmenu.ts b/src/utils/eventHandlers/contextmenu.ts index 4d93e9e..fd17917 100644 --- a/src/utils/eventHandlers/contextmenu.ts +++ b/src/utils/eventHandlers/contextmenu.ts @@ -52,4 +52,4 @@ export default function loadContextMenuEvents(client: Client, ft: FileType) { }) } }) -} \ No newline at end of file +} diff --git a/src/utils/eventHandlers/cron.ts b/src/utils/eventHandlers/cron.ts index 579a956..1784171 100644 --- a/src/utils/eventHandlers/cron.ts +++ b/src/utils/eventHandlers/cron.ts @@ -5,14 +5,33 @@ import { Cron } from "../../interfaces" export default function loadCronEvents() { const cronPath = path.join(__dirname, "..", "..", "events", "cron") - const cronFiles = fs.readdirSync(cronPath).filter(file => file.endsWith(".js")) + const cronFiles = fs + .readdirSync(cronPath) + .filter(file => file.endsWith(".js")) for (const file of cronFiles) { const filePath = path.join(cronPath, file) const cron: Cron = require(filePath) - const time = cron.time.seconds + " " + cron.time.minutes + " " + cron.time.hours + " " + cron.time.dayOfMonth + " " + cron.time.month + " " + cron.time.dayOfWeek + const time = + cron.time.seconds + + " " + + cron.time.minutes + + " " + + cron.time.hours + + " " + + cron.time.dayOfMonth + + " " + + cron.time.month + + " " + + cron.time.dayOfWeek - new CronJob(time, cron.execute, cron.onComplete, cron.start, cron.timeZone).start() + new CronJob( + time, + cron.execute, + cron.onComplete, + cron.start, + cron.timeZone, + ).start() } -} \ No newline at end of file +} diff --git a/src/utils/eventHandlers/events.ts b/src/utils/eventHandlers/events.ts index b1b1151..f41042d 100644 --- a/src/utils/eventHandlers/events.ts +++ b/src/utils/eventHandlers/events.ts @@ -14,4 +14,4 @@ export default function loadEvents(client: Client) { client.on(event.event, event.execute) } } -} \ No newline at end of file +} diff --git a/src/utils/eventHandlers/index.ts b/src/utils/eventHandlers/index.ts index c4a85ef..4d26817 100644 --- a/src/utils/eventHandlers/index.ts +++ b/src/utils/eventHandlers/index.ts @@ -13,5 +13,5 @@ export { loadContextMenuEvents, loadCronEvents, loadEvents, - loadModalEvents -} \ No newline at end of file + loadModalEvents, +}