Skip to content

Commit

Permalink
Merge formatting
Browse files Browse the repository at this point in the history
Merge formatting into main
  • Loading branch information
github-actions[bot] authored Dec 8, 2023
2 parents dee3b55 + 9fbfd6d commit 586727e
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 18 deletions.
2 changes: 1 addition & 1 deletion src/buttons/dare.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import {
PermissionFlagsBits,
MessageActionRowComponentBuilder,
bold,
ButtonInteraction
ButtonInteraction,
} from "discord.js";
import { captureException } from "@sentry/node";
import shuffle from "../util/shuffle";
Expand Down
37 changes: 20 additions & 17 deletions src/commands/settings/custom.ts
Original file line number Diff line number Diff line change
Expand Up @@ -221,15 +221,14 @@ const command: ChatInputCommand = {
type: option,
});

await client.database
.updateGuild(
interaction.guildId || "",
{
...guildDb,
customMessages: guildDb.customMessages,
},
true,
)
await client.database.updateGuild(
interaction.guildId || "",
{
...guildDb,
customMessages: guildDb.customMessages,
},
true,
);

const add =
new ActionRowBuilder<MessageActionRowComponentBuilder>().addComponents(
Expand Down Expand Up @@ -287,14 +286,18 @@ const command: ChatInputCommand = {
text: "Would You",
iconURL: client?.user?.displayAvatarURL() || undefined,
});
if (!guildDb.customMessages.find((c) => c.id === message)) {
interaction.reply({ content: "Custom message with ID: " + message + " doesn't exist.", ephemeral: true })
return;
}
interaction.reply({ content: "Sucessfully deleted question with id: " + message, ephemeral: true })
let filtered = guildDb.customMessages.filter(
(c) => c.id != message,
);
if (!guildDb.customMessages.find((c) => c.id === message)) {
interaction.reply({
content: "Custom message with ID: " + message + " doesn't exist.",
ephemeral: true,
});
return;
}
interaction.reply({
content: "Sucessfully deleted question with id: " + message,
ephemeral: true,
});
let filtered = guildDb.customMessages.filter((c) => c.id != message);

await client.database.updateGuild(
interaction.guildId || "",
Expand Down

0 comments on commit 586727e

Please sign in to comment.