forked from syntaxbullet/AuroraBot-discord
refactor: rename bot client, environment variables, and project name from Kyoko to Aurora.
This commit is contained in:
@@ -2,7 +2,7 @@ import { createCommand } from "@/lib/utils";
|
||||
import { SlashCommandBuilder, PermissionFlagsBits, EmbedBuilder, MessageFlags } from "discord.js";
|
||||
import { configManager } from "@/lib/configManager";
|
||||
import { config, reloadConfig } from "@/lib/config";
|
||||
import { KyokoClient } from "@/lib/BotClient"; // Import directly from lib, avoiding circular dep with index
|
||||
import { AuroraClient } from "@/lib/BotClient";
|
||||
|
||||
export const features = createCommand({
|
||||
data: new SlashCommandBuilder()
|
||||
@@ -31,7 +31,7 @@ export const features = createCommand({
|
||||
const subcommand = interaction.options.getSubcommand();
|
||||
|
||||
if (subcommand === "list") {
|
||||
const activeCommands = KyokoClient.commands;
|
||||
const activeCommands = AuroraClient.commands;
|
||||
const categories = new Map<string, string[]>();
|
||||
|
||||
// Group active commands
|
||||
@@ -87,8 +87,8 @@ export const features = createCommand({
|
||||
// Reload config from disk (which was updated by configManager)
|
||||
reloadConfig();
|
||||
|
||||
await KyokoClient.loadCommands(true);
|
||||
await KyokoClient.deployCommands();
|
||||
await AuroraClient.loadCommands(true);
|
||||
await AuroraClient.deployCommands();
|
||||
|
||||
await interaction.editReply({ content: `✅ Command **${commandName}** has been ${enabled ? "enabled" : "disabled"}. Commands reloaded!` });
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
import { createCommand } from "@lib/utils";
|
||||
import { KyokoClient } from "@/lib/BotClient";
|
||||
import { AuroraClient } from "@/lib/BotClient";
|
||||
import { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, MessageFlags } from "discord.js";
|
||||
import { createErrorEmbed, createSuccessEmbed, createWarningEmbed } from "@lib/embeds";
|
||||
|
||||
@@ -13,14 +13,14 @@ export const refresh = createCommand({
|
||||
|
||||
try {
|
||||
const start = Date.now();
|
||||
await KyokoClient.loadCommands(true);
|
||||
await AuroraClient.loadCommands(true);
|
||||
const duration = Date.now() - start;
|
||||
|
||||
// Deploy commands
|
||||
await KyokoClient.deployCommands();
|
||||
await AuroraClient.deployCommands();
|
||||
|
||||
const embed = createSuccessEmbed(
|
||||
`Successfully reloaded ${KyokoClient.commands.size} commands in ${duration}ms.`,
|
||||
`Successfully reloaded ${AuroraClient.commands.size} commands in ${duration}ms.`,
|
||||
"System Refreshed"
|
||||
);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user