fix replies

This commit is contained in:
MathMan05 2024-09-19 13:05:31 -05:00
parent 5ffdb05a8e
commit 4e0fa3fdbb
2 changed files with 10 additions and 8 deletions

View file

@ -781,19 +781,17 @@ class Channel extends SnowFlake{
}
}
async getmessage(id: string): Promise<Message>{
console.log("getting:"+id)
const message = this.messages.get(id);
if(message){
return message;
}else{
const gety = await fetch(
this.info.api +
"/channels/" +
this.id +
"/messages?limit=1&around=" +
id,
this.info.api + "/channels/" +this.id +"/messages?limit=1&around=" +id,
{ headers: this.headers }
);
const json = await gety.json();
console.log(json);
return new Message(json[0], this);
}
}