Skip to content

Commit

Permalink
sorry this was very much overreaction
Browse files Browse the repository at this point in the history
committed too fast but i was kinda pissed ok, too much happening rn
  • Loading branch information
Golem642 committed Nov 16, 2024
1 parent 8c19238 commit 75a6dee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/news/Edit.ts
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ export default class Edit {
);

const id = interaction.options.getString("id")!;
const news = get(id);
const news = get(guild.id, id);
if (!news) return await errorEmbed(interaction, "The specified news don't exist.");

const firstActionRow = new ActionRowBuilder<TextInputBuilder>().addComponents(
Expand Down
4 changes: 2 additions & 2 deletions src/commands/news/Remove.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,15 +38,15 @@ export default class Remove {
);

const id = interaction.options.getString("id")!;
const news = get(id);
const news = get(guild.id, id);
if (!news) return await errorEmbed(interaction, "The specified news don't exist.");

const newsChannel = (await guild.channels
.fetch((getSetting(guild.id, "news", "channel_id") as string) ?? interaction.channel?.id)
.catch(() => null)) as TextChannel;

if (newsChannel) await newsChannel.messages.delete(news.messageID);
deleteNews(id);
deleteNews(guild.id, id);
await interaction.reply({
embeds: [new EmbedBuilder().setTitle("News removed.").setColor(genColor(100))],
ephemeral: true
Expand Down

0 comments on commit 75a6dee

Please sign in to comment.