Compare commits
2 Commits
20ecfb3e84
...
9dcd27c45f
Author | SHA1 | Date | |
---|---|---|---|
9dcd27c45f | |||
e882ee7e57 |
@ -44,7 +44,7 @@ async function updateUserStatuses() {
|
||||
} else {
|
||||
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?
|
||||
await ch.setPosition(channel.position);
|
||||
//await ch.setPosition(channel.position);
|
||||
}
|
||||
} else if (belowChannel?.name.startsWith('┗')) {
|
||||
await belowChannel.delete();
|
||||
@ -85,5 +85,6 @@ client.on("interactionCreate", async i => {
|
||||
|
||||
var worldnamecache = {};
|
||||
async function getWorldNameForId(worldId) {
|
||||
if (worldId == "private") return "Private World";
|
||||
return worldnamecache[worldId] = worldnamecache[worldId] || (await worldsApi.getWorld(worldId)).data.name;
|
||||
}
|
Loading…
Reference in New Issue
Block a user