Skip to content

Commit

Permalink
issue seems to be with pack progress
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Oct 13, 2023
1 parent 3894e72 commit 6d484bf
Showing 1 changed file with 3 additions and 7 deletions.
10 changes: 3 additions & 7 deletions src/helpers/functions/missing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,13 +66,9 @@ export const computeAndUpdate = async (
const packProgress = (await axios.get(`${client.tokens.apiUrl}settings/channels.pack_progress`))
.data;

let channel: Channel;
try {
channel = await client.channels.fetch(packProgress[results[2].pack][results[2].edition]);
} catch {
// channel doesn't exist or can't be fetched, return early
return results;
}
const channel = client.channels.cache.get(packProgress[results[2].pack][results[2].edition]);
// channel doesn't exist or can't be fetched, return early
if (!channel) return results;

// you can add different patterns depending on the channel type
switch (channel.type) {
Expand Down

0 comments on commit 6d484bf

Please sign in to comment.