Updated Illegitimate class and files using it
This commit is contained in:
@@ -2,8 +2,7 @@ import { getUUID, getPlayer, getGuild, getIGN } from "utils/Hypixel"
|
|||||||
import { color, devMessage } from "config/options.json"
|
import { color, devMessage } from "config/options.json"
|
||||||
import { ChannelType, ChatInputCommandInteraction } from "discord.js"
|
import { ChannelType, ChatInputCommandInteraction } from "discord.js"
|
||||||
import { GuildData } from "interfaces"
|
import { GuildData } from "interfaces"
|
||||||
import Illegitimate from "utils/Illegitimate"
|
import { redis } from "utils/Illegitimate"
|
||||||
const redis = Illegitimate.redis
|
|
||||||
|
|
||||||
export default async function guildTop(interaction: ChatInputCommandInteraction): Promise<void> {
|
export default async function guildTop(interaction: ChatInputCommandInteraction): Promise<void> {
|
||||||
await interaction.deferReply()
|
await interaction.deferReply()
|
||||||
|
|||||||
@@ -2,9 +2,8 @@ import { hypixelGuildID, guildLogChannel, color, devMessage } from "config/optio
|
|||||||
import colorLog from "utils/functions/colors"
|
import colorLog from "utils/functions/colors"
|
||||||
import { getGuild, getIGN } from "utils/Hypixel"
|
import { getGuild, getIGN } from "utils/Hypixel"
|
||||||
import { Cron, GuildData } from "interfaces"
|
import { Cron, GuildData } from "interfaces"
|
||||||
import Illegitimate from "utils/Illegitimate"
|
import { client } from "utils/Illegitimate"
|
||||||
import { TextChannel } from "discord.js"
|
import { TextChannel } from "discord.js"
|
||||||
const client = Illegitimate.client
|
|
||||||
|
|
||||||
async function guildWeekly() {
|
async function guildWeekly() {
|
||||||
const channel = client.channels.cache.get(guildLogChannel) as TextChannel
|
const channel = client.channels.cache.get(guildLogChannel) as TextChannel
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
import Illegitimate from "utils/Illegitimate"
|
import { Bot as Illegitimate } from "utils/Illegitimate"
|
||||||
const illegitimate = new Illegitimate.Bot()
|
|
||||||
|
|
||||||
illegitimate.start()
|
new Illegitimate().start()
|
||||||
|
|||||||
@@ -49,4 +49,4 @@ class Bot {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export default { Bot, client, redis }
|
export { Bot, client, redis }
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ import {
|
|||||||
devLogChannel
|
devLogChannel
|
||||||
} from "config/options.json"
|
} from "config/options.json"
|
||||||
import { Guild, MessageCreateOptions, TextChannel } from "discord.js"
|
import { Guild, MessageCreateOptions, TextChannel } from "discord.js"
|
||||||
import Illegitimate from "utils/Illegitimate"
|
import { client } from "utils/Illegitimate"
|
||||||
|
|
||||||
const channels = {
|
const channels = {
|
||||||
online: onlineLogChannel,
|
online: onlineLogChannel,
|
||||||
@@ -22,7 +22,7 @@ const channels = {
|
|||||||
type Channel = keyof typeof channels
|
type Channel = keyof typeof channels
|
||||||
|
|
||||||
export default async function logToChannel(channel: Channel, message: MessageCreateOptions): Promise<void | null> {
|
export default async function logToChannel(channel: Channel, message: MessageCreateOptions): Promise<void | null> {
|
||||||
const guild = Illegitimate.client.guilds.cache.get(guildid) as Guild
|
const guild = client.guilds.cache.get(guildid) as Guild
|
||||||
let logChannel: TextChannel
|
let logChannel: TextChannel
|
||||||
|
|
||||||
if (process.env.NODE_ENV === "dev") {
|
if (process.env.NODE_ENV === "dev") {
|
||||||
|
|||||||
Reference in New Issue
Block a user