Send position property on guild join
This commit is contained in:
parent
6ca12cb7fb
commit
5f9c6b01a7
@ -31,7 +31,7 @@ import {
|
||||
PrimaryGeneratedColumn,
|
||||
RelationId,
|
||||
} from "typeorm";
|
||||
import { Ban, PublicGuildRelations } from ".";
|
||||
import { Ban, Channel, PublicGuildRelations } from ".";
|
||||
import { ReadyGuildDTO } from "../dtos";
|
||||
import {
|
||||
GuildCreateEvent,
|
||||
@ -330,6 +330,13 @@ export class Member extends BaseClassWithoutId {
|
||||
relationLoadStrategy: "query",
|
||||
});
|
||||
|
||||
for await (const channel of guild.channels) {
|
||||
channel.position = await Channel.calculatePosition(
|
||||
channel.id,
|
||||
guild_id,
|
||||
);
|
||||
}
|
||||
|
||||
const memberCount = await Member.count({ where: { guild_id } });
|
||||
|
||||
const memberPreview = (
|
||||
|
Loading…
x
Reference in New Issue
Block a user