diff --git a/structures/Guild.ts b/structures/Guild.ts index 2f88322..0dd829a 100644 --- a/structures/Guild.ts +++ b/structures/Guild.ts @@ -35,7 +35,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, 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 aa4d7ed..6f797aa 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() {