mirror of
https://github.com/remix-bot/fluxer.git
synced 2026-11-24 06:01:44 -05:00
fetch all guilds instead of using GuildManager
This commit is contained in:
1 file changed
+2
-7
@@ -71,13 +71,8 @@ export class Dashboard {
|
|||||||
}
|
}
|
||||||
|
|
||||||
case "allServers": {
|
case "allServers": {
|
||||||
// Return ALL guilds the bot is in (no member check). The backend
|
const guilds = await this.remix.client.user.fetchGuilds();
|
||||||
// filters by the user's own guild list to produce the mutual set.
|
return guilds.map(g => Dashboard.convertServer(g));
|
||||||
const guilds = this.remix.client.guilds;
|
|
||||||
const guildValues = guilds && typeof guilds.values === "function"
|
|
||||||
? [...guilds.values()]
|
|
||||||
: guilds ? Object.values(guilds) : [];
|
|
||||||
return guildValues.map(g => Dashboard.convertServer(g));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
case "commands":
|
case "commands":
|
||||||
|
|||||||
Reference in new issue
Block a user