Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Move Guild#defaultRole to RoleStore#everyone #3347

Merged
merged 6 commits into from Aug 17, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/stores/RoleStore.js
Expand Up @@ -110,6 +110,15 @@ class RoleStore extends DataStore {
});
}

/**
* The `@everyone` role of the guild
* @type {?Role}
* @readonly
*/
get everyone() {
return this.get(this.guild.id) || null;
}

/**
* The role with the highest position in the store
* @type {Role}
Expand Down
9 changes: 0 additions & 9 deletions src/structures/Guild.js
Expand Up @@ -483,15 +483,6 @@ class Guild extends Base {
return this.client.channels.get(this.embedChannelID) || null;
}

/**
* The `@everyone` role of the guild
* @type {?Role}
* @readonly
*/
get defaultRole() {
return this.roles.get(this.id) || null;
}

/**
* The client user as a GuildMember of this guild
* @type {?GuildMember}
Expand Down
2 changes: 1 addition & 1 deletion typings/index.d.ts
Expand Up @@ -403,7 +403,6 @@ declare module 'discord.js' {
public readonly createdAt: Date;
public readonly createdTimestamp: number;
public defaultMessageNotifications: DefaultMessageNotifications | number;
public readonly defaultRole: Role | null;
public deleted: boolean;
public description: string | null;
public embedChannel: GuildChannel | null;
Expand Down Expand Up @@ -1502,6 +1501,7 @@ declare module 'discord.js' {

export class RoleStore extends DataStore<Snowflake, Role, typeof Role, RoleResolvable> {
constructor(guild: Guild, iterable?: Iterable<any>);
public readonly everyone: Role | null;
public readonly highest: Role;

public create(options?: { data?: RoleData, reason?: string }): Promise<Role>;
Expand Down