Skip to content

Commit

Permalink
Revert "refactor: move Guild#defaultRole to RoleStore#everyone (disco…
Browse files Browse the repository at this point in the history
…rdjs#3347)"

This reverts commit 7d4ebb0.
  • Loading branch information
samsamson33 committed Feb 27, 2020
1 parent 260138d commit 7563592
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
9 changes: 0 additions & 9 deletions src/stores/RoleStore.js
Expand Up @@ -110,15 +110,6 @@ 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: 9 additions & 0 deletions src/structures/Guild.js
Expand Up @@ -489,6 +489,15 @@ 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 @@ -686,6 +686,7 @@ 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 @@ -1794,7 +1795,6 @@ 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

0 comments on commit 7563592

Please sign in to comment.