Compare commits

..

No commits in common. "20ecfb3e8430e3d090c82c4b4b9433689dded831" and "940d3f6c305a9e6b0c33f86b5272646a06cbb3a1" have entirely different histories.

View File

@ -37,12 +37,11 @@ async function updateUserStatuses() {
let belowChannel = client.channels.resolve(config.vrchat_status_category).children.find(x => x.position = channel.position + 1); let belowChannel = client.channels.resolve(config.vrchat_status_category).children.find(x => x.position = channel.position + 1);
if (user.worldId && user.worldId != "offline") { if (user.worldId && user.worldId != "offline") {
console.debug(user.worldId);
let bcn = `${await getWorldNameForId(user.worldId)}`; let bcn = `${await getWorldNameForId(user.worldId)}`;
if (belowChannel && belowChannel.name.startsWith('┗') && belowChannel.name != bcn) { if (belowChannel && belowChannel.name.startsWith('┗') && belowChannel.name != bcn) {
await belowChannel.setName(bcn); await belowChannel.setName(bcn);
} else { } else {
let ch = await client.channels.resolve(config.vrchat_status_category).createChannel(`${await getWorldNameForId(user.worldId)}`, {type: "GUILD_VOICE", position: belowChannel.position}); let ch = await client.channels.resolve(config.vrchat_status_category).createChannel(`${worldname}`, {type: "GUILD_VOICE", position: belowChannel.position});
//position option doesn't work? //position option doesn't work?
await ch.setPosition(channel.position); await ch.setPosition(channel.position);
} }
@ -51,7 +50,7 @@ async function updateUserStatuses() {
} }
} catch (error) { } catch (error) {
console.error("vrcus", error.stack); console.error("vrcus", error.message);
} }
} }
} }