Updated type system
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
import { TextChannel } from "discord.js"
|
||||
import { devMessage, embedColor, guildLogChannel, hypixelGuildID } from "~/config/options.js"
|
||||
import { ICron, IGuildData } from "~/interfaces"
|
||||
import { ICron, IGuildData } from "~/typings"
|
||||
import { numberFormatter } from "~/utils/Functions/intlFormaters.js"
|
||||
import { getGuild, getIGN } from "~/utils/Hypixel.js"
|
||||
import { client } from "~/utils/Illegitimate.js"
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
import { userMention } from "discord.js"
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IEvent } from "~/interfaces"
|
||||
import { Event } from "~/typings"
|
||||
import { dateTimeFormatter } from "~/utils/Functions/intlFormaters.js"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
const event: IEvent<"guildMemberAdd"> = (member) => {
|
||||
const event: Event<"guildMemberAdd"> = (member) => {
|
||||
if (process.env.NODE_ENV === "dev") return
|
||||
logToChannel("bot", {
|
||||
embeds: [{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { IEvent } from "~/interfaces"
|
||||
import { Event } from "~/typings"
|
||||
import { log } from "~/utils/Logger.js"
|
||||
|
||||
const event: IEvent<"interactionCreate"> = (interaction) => {
|
||||
const event: Event<"interactionCreate"> = (interaction) => {
|
||||
if (interaction.isChatInputCommand()) {
|
||||
let subcommand: string | null
|
||||
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { IEvent } from "~/interfaces"
|
||||
import { Event } from "~/typings"
|
||||
import { log } from "~/utils/Logger.js"
|
||||
|
||||
const event: IEvent<"ready"> = (client) => {
|
||||
const event: Event<"ready"> = (client) => {
|
||||
log("Logged in as " + client.user!.tag + "!", "info", { type: "preset", color: "green" })
|
||||
}
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
import { embedColor } from "~/config/options.js"
|
||||
import { IEvent } from "~/interfaces"
|
||||
import { Event } from "~/typings"
|
||||
import logToChannel from "~/utils/Functions/logtochannel.js"
|
||||
|
||||
const event: IEvent<"ready"> = () => {
|
||||
const event: Event<"ready"> = () => {
|
||||
if (process.env.NODE_ENV === "dev") return
|
||||
|
||||
logToChannel("online", {
|
||||
|
||||
@@ -1,9 +1,9 @@
|
||||
import { Guild } from "discord.js"
|
||||
import { guildid } from "~/config/options.js"
|
||||
import statuses from "~/config/statuses.js"
|
||||
import { IEvent } from "~/interfaces"
|
||||
import { Event } from "~/typings"
|
||||
|
||||
const event: IEvent<"ready"> = (client) => {
|
||||
const event: Event<"ready"> = (client) => {
|
||||
const user = client.user!
|
||||
const guild = client.guilds.cache.get(guildid) as Guild
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import { IEvent } from "~/interfaces"
|
||||
import { Event } from "~/typings"
|
||||
|
||||
const event: IEvent<"voiceStateUpdate"> = (_o, n) => {
|
||||
const event: Event<"voiceStateUpdate"> = (_o, n) => {
|
||||
const guild = n.guild
|
||||
|
||||
if (!guild) return
|
||||
|
||||
Reference in New Issue
Block a user