fix replies
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user