From 3562400c565e17d588a8efe6d6ade10f1c29ee75 Mon Sep 17 00:00:00 2001 From: Yuzu Date: Sat, 25 Jun 2022 18:35:21 -0500 Subject: [PATCH] hotfix: forgot to pass session --- structures/Guild.ts | 2 +- structures/Role.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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() {