2022-03-19 10:37:45 +00:00
|
|
|
'use strict';
|
|
|
|
|
|
|
|
const BaseGuild = require('./BaseGuild');
|
2022-03-24 10:55:32 +00:00
|
|
|
const Permissions = require('../util/Permissions');
|
2022-03-19 10:37:45 +00:00
|
|
|
|
|
|
|
/**
|
|
|
|
* A partial guild received when using {@link GuildManager#fetch} to fetch multiple guilds.
|
|
|
|
* @extends {BaseGuild}
|
|
|
|
*/
|
|
|
|
class OAuth2Guild extends BaseGuild {
|
|
|
|
constructor(client, data) {
|
|
|
|
super(client, data);
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Whether the client user is the owner of the guild
|
|
|
|
* @type {boolean}
|
|
|
|
*/
|
|
|
|
this.owner = data.owner;
|
|
|
|
|
|
|
|
/**
|
|
|
|
* The permissions that the client user has in this guild
|
2022-03-24 10:55:32 +00:00
|
|
|
* @type {Readonly<Permissions>}
|
2022-03-19 10:37:45 +00:00
|
|
|
*/
|
2022-03-24 10:55:32 +00:00
|
|
|
this.permissions = new Permissions(BigInt(data.permissions)).freeze();
|
2022-03-19 10:37:45 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module.exports = OAuth2Guild;
|