fix replies
This commit is contained in:
parent
5ffdb05a8e
commit
4e0fa3fdbb
2 changed files with 10 additions and 8 deletions
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue