Skip to content

Commit

Permalink
fix: show channel switch instead of switchCalled warning
Browse files Browse the repository at this point in the history
  • Loading branch information
dev-737 committed Apr 25, 2024
1 parent 571083a commit b566265
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/commands/slash/Main/connection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -269,22 +269,13 @@ export default class Connection extends BaseCommand {
.setPlaceholder('Select a channel to switch to.'),
);

// current interaction will become outdated due to new channelId
await interaction.update({
content: t(
{ phrase: 'connection.switchCalled', locale: interaction.user.locale },
{ emoji: emojis.info },
),
components: disableComponents(interaction.message),
});

await interaction.followUp({
content: t(
{ phrase: 'connection.switchChannel', locale: interaction.user.locale },
{ emoji: emojis.info },
),
embeds: [],
components: [channelSelect],
ephemeral: true,
});
break;
}
Expand Down Expand Up @@ -334,6 +325,7 @@ export default class Connection extends BaseCommand {
const channelInHub = await db.connectedList.findFirst({
where: { channelId: newChannel?.id },
});

if (channelInHub) {
await interaction.editReply({
content: null,
Expand Down

0 comments on commit b566265

Please sign in to comment.