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; return;
} }
await fetch( await fetch(
this.info.api + this.info.api + "/channels/" +this.id +"/messages?limit=100&after=" +id,{
"/channels/" +
this.id +
"/messages?limit=100&after=" +
id,
{
headers: this.headers, headers: this.headers,
} }
) )

View file

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

View file

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