diff --git a/structures/Guild.ts b/structures/Guild.ts index f18eb86..37dfe5b 100644 --- a/structures/Guild.ts +++ b/structures/Guild.ts @@ -39,7 +39,7 @@ export class Guild extends BaseGuild implements Model { this.defaultMessageNotificationLevel = data.default_message_notifications; this.explicitContentFilterLevel = data.explicit_content_filter; this.members = data.members?.map((member) => new Member(session, { ...member, user: member.user! })) ?? []; - this.roles = data.roles.map((role) => new Role(session, this.id, role)); + this.roles = data.roles.map((role) => new Role(session, data.id, role)); } splashHash?: bigint; diff --git a/structures/Role.ts b/structures/Role.ts index 34b5d03..be4c156 100644 --- a/structures/Role.ts +++ b/structures/Role.ts @@ -47,7 +47,7 @@ export class Role implements Model { async delete(): Promise { // cool jS trick - await Guild.prototype.deleteRole.call({ id: this.guildId }, this.id); + await Guild.prototype.deleteRole.call({ id: this.guildId, session: this.session }, this.id); } toString() {