Bug Fixes

- fixed two bugs in the interface
pull/33/head
Trivernis 6 years ago
parent bfe29e0ef4
commit 9ce38e4f3b

@ -72,11 +72,14 @@ function queryGuilds() {
}`;
postQuery(query).then((res) => {
for (let guild of res.data.client.guilds) {
let option = document.createElement('option');
option.setAttribute('value', guild.id);
option.innerText = guild.dj.playing? guild.name + ' 🎶' : guild.name;
let guildSelect = document.querySelector('#guild-select');
guildSelect.appendChild(option);
if ($(`option[value=${guild.id}]`).length === 0) {
let option = document.createElement('option');
option.setAttribute('value', guild.id);
if (guild.dj)
option.innerText = guild.dj.playing? guild.name + ' 🎶' : guild.name;
let guildSelect = document.querySelector('#guild-select');
guildSelect.appendChild(option);
}
}
});
}

Loading…
Cancel
Save