|
|
|
@ -72,12 +72,15 @@ function queryGuilds() {
|
|
|
|
|
}`;
|
|
|
|
|
postQuery(query).then((res) => {
|
|
|
|
|
for (let guild of res.data.client.guilds) {
|
|
|
|
|
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);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|