diff options
author | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-05-31 20:32:50 +0200 |
---|---|---|
committer | Flam3rboy <34555296+Flam3rboy@users.noreply.github.com> | 2021-05-31 20:32:50 +0200 |
commit | 0713f89bba9b4e4b11e7503877bb69f3907e02b4 (patch) | |
tree | 41cb308b0f98bcb899f46759f97facca4b714e02 /src/util | |
parent | :bug: fix config (diff) | |
download | server-0713f89bba9b4e4b11e7503877bb69f3907e02b4.tar.xz |
:art: rename recipients -> recipient_ids
Diffstat (limited to 'src/util')
-rw-r--r-- | src/util/Permissions.ts | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/util/Permissions.ts b/src/util/Permissions.ts index e454bf00..d9bd0ae0 100644 --- a/src/util/Permissions.ts +++ b/src/util/Permissions.ts @@ -145,7 +145,7 @@ export class Permissions extends BitField { guild: { roles: Role[] }; channel?: { overwrites?: ChannelPermissionOverwrite[]; - recipients?: string[] | null; + recipient_ids?: string[] | null; owner_id?: string; }; }) { @@ -163,9 +163,9 @@ export class Permissions extends BitField { permission = Permissions.channelPermission(overwrites, permission); } - if (channel?.recipients) { + if (channel?.recipient_ids) { if (channel?.owner_id === user.id) return new Permissions("ADMINISTRATOR"); - if (channel.recipients.includes(user.id)) { + if (channel.recipient_ids.includes(user.id)) { // Default dm permissions return new Permissions([ "VIEW_CHANNEL", @@ -210,7 +210,7 @@ export async function getPermission( if (channel_id && !channel) { channel = await ChannelModel.findOne( { id: channel_id }, - { permission_overwrites: true, recipients: true, owner_id: true, guild_id: true } + { permission_overwrites: true, recipient_ids: true, owner_id: true, guild_id: true } ).exec(); if (!channel) throw new HTTPError("Channel not found", 404); if (channel.guild_id) guild_id = channel.guild_id; @@ -238,7 +238,7 @@ export async function getPermission( channel: { overwrites: channel?.permission_overwrites, owner_id: channel?.owner_id, - recipients: channel?.recipients, + recipient_ids: channel?.recipient_ids, }, }); |