feat: Implement custom error classes, a Drizzle transaction utility, and update Discord.js ephemeral message flags.

This commit is contained in:
syntaxbullet
2025-12-15 22:14:17 +01:00
parent 3c81fd8396
commit 7e986fae5a
14 changed files with 112 additions and 114 deletions

View File

@@ -1,6 +1,6 @@
import { createCommand } from "@lib/utils";
import { KyokoClient } from "@/lib/BotClient";
import { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits } from "discord.js";
import { SlashCommandBuilder, EmbedBuilder, PermissionFlagsBits, MessageFlags } from "discord.js";
import { createErrorEmbed } from "@lib/embeds";
export const reload = createCommand({
@@ -9,7 +9,7 @@ export const reload = createCommand({
.setDescription("Reloads all commands")
.setDefaultMemberPermissions(PermissionFlagsBits.Administrator),
execute: async (interaction) => {
await interaction.deferReply({ ephemeral: true });
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
try {
await KyokoClient.loadCommands(true);

View File

@@ -1,5 +1,5 @@
import { createCommand } from "@/lib/utils";
import { SlashCommandBuilder, PermissionFlagsBits, TextChannel, NewsChannel, VoiceChannel } from "discord.js";
import { SlashCommandBuilder, PermissionFlagsBits, TextChannel, NewsChannel, VoiceChannel, MessageFlags } from "discord.js";
import { createErrorEmbed } from "@/lib/embeds";
export const webhook = createCommand({
@@ -13,7 +13,7 @@ export const webhook = createCommand({
.setRequired(true)
),
execute: async (interaction) => {
await interaction.deferReply({ ephemeral: true });
await interaction.deferReply({ flags: MessageFlags.Ephemeral });
const payloadString = interaction.options.getString("payload", true);
let payload;