Skip to content

Commit

Permalink
fix: this context lost on destruct (#387)
Browse files Browse the repository at this point in the history
  • Loading branch information
kristersd authored Jun 12, 2024
1 parent 006ad94 commit 0e184d8
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/features/resume.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,12 @@ export const resumeResources = async (bot: Client) => {
deferred.edit("Looking for a resume…");
const messages = await interaction.channel.messages.fetch();

const { fetchStarterMessage } = interaction.channel;
const firstMessage = await retry(() => fetchStarterMessage(), 5, 10);
const channel = interaction.channel;
const firstMessage = await retry(
() => channel.fetchStarterMessage(),
5,
10,
);
if (!firstMessage) {
await interaction.reply({
ephemeral: true,
Expand Down

0 comments on commit 0e184d8

Please sign in to comment.