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

Loading…
Cancel
Save