|
|
|
@ -8,7 +8,6 @@ window.onload = async () =>
|
|
|
|
|
updateUser(accessToken, tokenType);
|
|
|
|
|
updateGuildData(accessToken, tokenType);
|
|
|
|
|
document.getElementById('RoleRules').onclick = handleToggleRules;
|
|
|
|
|
test();
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
function updateUser(accessToken, tokenType)
|
|
|
|
@ -211,6 +210,17 @@ async function handleToggleRules(element)
|
|
|
|
|
var guildID = element.target.parentNode.getElementsByTagName('h3')[0].id;
|
|
|
|
|
var rulesElement=document.getElementById('rules');
|
|
|
|
|
var rules = await getRules(guildID);
|
|
|
|
|
document.getElementById('roleID').innerHTML = '';
|
|
|
|
|
for(var role of guildsCache.get(guildID).roles)
|
|
|
|
|
{
|
|
|
|
|
document.getElementById('roleID').innerHTML += `<option value="${role.id}">${role.name}</option>`;
|
|
|
|
|
}
|
|
|
|
|
document.getElementById('emojiID').innerHTML = '';
|
|
|
|
|
for(var emoji of guildsCache.get(guildID).emojis)
|
|
|
|
|
{
|
|
|
|
|
document.getElementById('emojiID').innerHTML += `<option value="${emoji.id}">${emoji.name}</option>`;
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if(!rules) return
|
|
|
|
|
var ruleArr = []
|
|
|
|
|
for(var rule of rules)
|
|
|
|
@ -436,12 +446,17 @@ async function changeRule(element)
|
|
|
|
|
}
|
|
|
|
|
function addFeed(element)
|
|
|
|
|
{
|
|
|
|
|
document.getElementById('DCchannelID').innerHTML = '';
|
|
|
|
|
for(var channel of guildsCache.get(element.parentNode.parentNode.childNodes[3].id).guildTextChannels)
|
|
|
|
|
{
|
|
|
|
|
document.getElementById('DCchannelID').innerHTML += `<option value="${channel.id}">${channel.name}</option>`;
|
|
|
|
|
}
|
|
|
|
|
element.parentNode.classList.add('hidden');
|
|
|
|
|
element.parentNode.parentNode.classList.add('hidden');
|
|
|
|
|
var FeedWrapper = document.getElementById('FeedWrapper');
|
|
|
|
|
FeedWrapper.classList.remove('hidden');
|
|
|
|
|
document.getElementById('ChannelName').innerText = 'New Feed'
|
|
|
|
|
document.getElementById('DCchannelID').placeholder = '';
|
|
|
|
|
// document.getElementById('DCchannelID').placeholder = '';
|
|
|
|
|
document.getElementById('YTchannelID').placeholder = '';
|
|
|
|
|
document.getElementById('CostumMessageI').placeholder = '';
|
|
|
|
|
document.getElementById('change2').innerText = 'Add';
|
|
|
|
|