Compare commits
No commits in common. "3369bd521dc1d4ff2bd82d8861261a8268b5a741" and "a44f81bddf829de172529d3b7d6ad9335297cae9" have entirely different histories.
3369bd521d
...
a44f81bddf
@ -43,14 +43,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);
|
||||||
console.debug(channel.name, channel.position, belowChannel.name, belowChannel.position, belowChannel.id);
|
|
||||||
if (user.worldId && user.worldId != "offline") {
|
if (user.worldId && user.worldId != "offline") {
|
||||||
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(`┗ ${await getWorldNameForId(user.worldId)}`, {type: "GUILD_VOICE", /*position: belowChannel.position*/});
|
||||||
// position option is erratic
|
|
||||||
await ch.setPosition(channel.position + 1);
|
await ch.setPosition(channel.position + 1);
|
||||||
}
|
}
|
||||||
} else if (belowChannel?.name.startsWith('┗')) {
|
} else if (belowChannel?.name.startsWith('┗')) {
|
||||||
|
Loading…
Reference in New Issue
Block a user