mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-12 09:33:32 +01:00
feat: add support for fetching multiple guilds (#5472)
Co-authored-by: SpaceEEC <spaceeec@yahoo.com> Co-authored-by: Noel <icrawltogo@gmail.com>
This commit is contained in:
28
src/structures/OAuth2Guild.js
Normal file
28
src/structures/OAuth2Guild.js
Normal file
@@ -0,0 +1,28 @@
|
||||
'use strict';
|
||||
|
||||
const BaseGuild = require('./BaseGuild');
|
||||
const Permissions = require('../util/Permissions');
|
||||
|
||||
/**
|
||||
* 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
|
||||
* @type {Readonly<Permissions>}
|
||||
*/
|
||||
this.permissions = new Permissions(BigInt(data.permissions)).freeze();
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = OAuth2Guild;
|
||||
Reference in New Issue
Block a user