bug issue; rewrite all messages

This commit is contained in:
Xamora 2023-12-19 12:42:46 +01:00
parent acba77e228
commit 57ed6165ea

View File

@ -135,7 +135,10 @@ export default class extends AbstractView {
// les messages, réecriture seulement du dernier // les messages, réecriture seulement du dernier
let i = 0; let i = 0;
client.channel.messages.forEach((message) => { client.channel.messages.forEach((message) => {
if (messages[i] == null || message != messages.children[i].innerText) { if (messages.children[i] == null || message.content != messages.children[i].innerText) {
console.log(message.content);
if (messages.children[i] != null)
console.log(messages.children[i].innerText);
let text = document.createElement("p"); let text = document.createElement("p");
text.appendChild(document.createTextNode(message.content)); text.appendChild(document.createTextNode(message.content));
if (message.author_id == client.me.user_id) if (message.author_id == client.me.user_id)