Merge branch 'dev' into 'main'

Dev

See merge request illegitimate/illegitimate-bot!200
This commit is contained in:
2024-01-26 08:55:34 +00:00
5 changed files with 7 additions and 10 deletions

View File

@@ -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()

View File

@@ -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

View File

@@ -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()

View File

@@ -49,4 +49,4 @@ class Bot {
} }
} }
export default { Bot, client, redis } export { Bot, client, redis }

View File

@@ -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") {