Skip to content

Commit

Permalink
more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
3vorp committed Oct 15, 2023
1 parent eb34996 commit 0356ef7
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions src/helpers/functions/missing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,8 @@ export const computeAndUpdate = async (

console.log("compute results fetched");

console.log(`url to use by axios: ${client.tokens.apiUrl}settings/channels.pack_progress}`)

const packProgress = (
await axios.get(`${client.tokens.apiUrl}settings/channels.pack_progress`, { proxy: false })
).data;
Expand All @@ -83,16 +85,8 @@ export const computeAndUpdate = async (
case ChannelType.GuildVoice:
const pattern = /[.\d+]+(?!.*[.\d+])/;
if (channel.name.match(pattern)?.[0] == results[2].completion.toString()) break;

console.log(`channel hasn't been updated yet: ${channel.name.match(pattern)?.[0]}`);

const updatedName = channel.name.replace(pattern, results[2].completion.toString());

console.log(`name has been changed to ${updatedName}`);

channel.setName(updatedName).catch(console.error);

console.log("channel name set successfully");
break;
}

Expand Down

0 comments on commit 0356ef7

Please sign in to comment.