Send channel name to dashboard

This commit is contained in:
Choco
2023-03-25 21:13:49 +08:00
parent f9b14851f7
commit 4a7a5f5459
2 changed files with 3 additions and 0 deletions

View File

@@ -79,6 +79,7 @@ class Nodes(commands.Cog):
"avatar_url": member.avatar.url,
"name": member.name,
},
"channel_name": member.voice.channel.name if is_joined else "",
"guild_id": guild,
"is_joined": is_joined
})

View File

@@ -89,6 +89,8 @@ const actions = {
updateGuild: function (player, data) {
const user = data["user"];
player.channelName = data["channel_name"];
if (user["user_id"] == player.userId) {
if (data['is_joined']) {
player.send({ "op": "initPlayer" });