Feat: Adding GUILDS! #12

Merged
snxraven merged 21 commits from guilds into main 2024-07-07 23:01:33 -04:00
Showing only changes of commit 43e9890235 - Show all commits

13
app.js
View File

@ -1129,6 +1129,19 @@ function addMessage(name, message, avatar, topic) {
}
}
async function updateIcon(username, avatarBuffer) {
const userIcon = document.querySelector(`img[src*="${username}.png"]`);
if (userIcon) {
const avatarBlob = new Blob([avatarBuffer], { type: 'image/png' });
const avatarUrl = URL.createObjectURL(avatarBlob);
userIcon.src = updatePortInUrl(avatarUrl);
config.userAvatar = avatarUrl;
writeConfigToFile("./config.json");
}
}
function clearMessages() {
const messagesContainer = document.querySelector('#messages');
while (messagesContainer.firstChild) {