Skip to content

Commit

Permalink
style: Remove unnecessary assertions.
Browse files Browse the repository at this point in the history
  • Loading branch information
vxern committed Sep 19, 2024
1 parent d21a296 commit b75bc04
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions source/library/stores/interactions.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ class InteractionStore {
locale: interaction.guildLocale,
});
const message = await this.#client.bot.helpers
.sendMessage(interaction.channelId!, {
.sendMessage(interaction.channelId, {
embeds: [
{
description: strings.thinking,
Expand Down Expand Up @@ -220,7 +220,7 @@ class InteractionStore {
this.#replies.set(interaction.token, { ephemeral: !visible });

if (interaction.parameters["@repeat"]) {
const message = await this.#client.bot.helpers.sendMessage(interaction.channelId!, data).catch((error) => {
const message = await this.#client.bot.helpers.sendMessage(interaction.channelId, data).catch((error) => {
this.log.error(error, "Failed to make message reply to repeated interaction.");
return undefined;
});
Expand Down Expand Up @@ -254,7 +254,7 @@ class InteractionStore {
if (interaction.parameters["@repeat"]) {
const messageId = this.#messages.get(interaction.token)!;

await this.#client.bot.helpers.editMessage(interaction.channelId!, messageId, data).catch((error) => {
await this.#client.bot.helpers.editMessage(interaction.channelId, messageId, data).catch((error) => {
this.log.error(error, "Failed to edit message reply made to repeated interaction.");
return undefined;
});
Expand All @@ -277,7 +277,7 @@ class InteractionStore {

this.#messages.delete(interaction.token);

await this.#client.bot.helpers.deleteMessage(interaction.channelId!, messageId).catch((error) => {
await this.#client.bot.helpers.deleteMessage(interaction.channelId, messageId).catch((error) => {
this.log.error(error, "Failed to delete message reply made to repeated interaction.");
return undefined;
});
Expand Down

0 comments on commit b75bc04

Please sign in to comment.