Compare commits
2 Commits
940d3f6c30
...
20ecfb3e84
Author | SHA1 | Date | |
---|---|---|---|
20ecfb3e84 | |||
16f4b7eaf9 |
@ -37,11 +37,12 @@ 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(`┗ ${worldname}`, {type: "GUILD_VOICE", position: belowChannel.position});
|
let ch = await client.channels.resolve(config.vrchat_status_category).createChannel(`┗ ${await getWorldNameForId(user.worldId)}`, {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);
|
||||||
}
|
}
|
||||||
@ -50,7 +51,7 @@ async function updateUserStatuses() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error("vrcus", error.message);
|
console.error("vrcus", error.stack);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user