Skip to content

Commit

Permalink
fixes closing the kitchen
Browse files Browse the repository at this point in the history
  • Loading branch information
mrhappyma committed Dec 25, 2024
1 parent 5fe7cec commit 79f0790
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/modules/applications.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ export const createApplication = async (user: string) => {
return `${env.APPLICATION_URL}?t=${application.token}`;
};

//TODO: use messagesClient
bot.registerButton("devtools:apply-button", async (interaction) => {
await interaction.deferUpdate();
const embed = new EmbedBuilder()
Expand Down
6 changes: 3 additions & 3 deletions src/modules/closed.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import {
TextInputBuilder,
TextInputStyle,
} from "discord.js";
import bot, { prisma } from "..";
import { messagesClient, prisma } from "..";
import { KitchenChannel, sendKitchenMessage } from "../utils/kitchenChannels";
import { emojiInline } from "../utils/emoji";

Expand All @@ -23,7 +23,7 @@ const loadClosed = async () => {
};
loadClosed();

bot.registerButton("devtools:closed-toggle", async (interaction) => {
messagesClient.registerButton("devtools:closed-toggle", async (interaction) => {
if (closed) {
closed = false;
await prisma.kitchenConfig.update({
Expand Down Expand Up @@ -67,7 +67,7 @@ bot.registerButton("devtools:closed-toggle", async (interaction) => {
}
});

bot.registerModal("kitchen-close", async (interaction) => {
messagesClient.registerModal("kitchen-close", async (interaction) => {
const reason = interaction.fields.getTextInputValue("reason");
closed = true;
closedReason = reason;
Expand Down

0 comments on commit 79f0790

Please sign in to comment.