This commit is contained in:
MathMan05 2024-10-26 16:18:17 -05:00
parent f8e10a1e09
commit 071870aa96
3 changed files with 6 additions and 16 deletions

View file

@ -1023,12 +1023,7 @@ class Channel extends SnowFlake{
return;
}
await fetch(
this.info.api +
"/channels/" +
this.id +
"/messages?limit=100&after=" +
id,
{
this.info.api + "/channels/" +this.id +"/messages?limit=100&after=" +id,{
headers: this.headers,
}
)

View file

@ -11,13 +11,7 @@ type dialogjson =
| ["title", string]
| ["radio", string, string[], (this: unknown, e: string) => unknown, number]
| ["html", HTMLElement]
| [
"select",
string,
string[],
(this: HTMLSelectElement, e: Event) => unknown,
number
]
| ["select", string, string[], (this: HTMLSelectElement, e: Event) => unknown, number]
| ["tabs", [string, dialogjson][]];
class Dialog{
layout: dialogjson;

View file

@ -86,10 +86,11 @@ class Localuser{
this.lookingguild = undefined;
this.guildhtml = new Map();
const members: { [key: string]: memberjson } = {};
for(const thing of ready.d.merged_members){
members[thing[0].guild_id] = thing[0];
if(ready.d.merged_members){
for(const thing of ready.d.merged_members){
members[thing[0].guild_id] = thing[0];
}
}
for(const thing of ready.d.guilds){
const temp = new Guild(thing, this, members[thing.id]);
this.guilds.push(temp);