Skip to content

Commit

Permalink
refactor: move things around
Browse files Browse the repository at this point in the history
  • Loading branch information
Jiralite committed May 19, 2022
1 parent a454d39 commit ec512c7
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 11 deletions.
18 changes: 9 additions & 9 deletions packages/discord.js/src/structures/AutoModRule.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,17 +15,23 @@ class AutoModRule extends Base {
*/
this.name = data.name;

/**
* The event type of this rule.
* @type {number}
*/
this.eventType = data.event_type;

/**
* The trigger type of this rule.
* @type {number}
*/
this.triggerType = data.trigger_type;

/**
* The event type of this rule.
* @type {number}
* The trigger metadata of the rule.
* @type {Object}
*/
this.eventType = data.event_type;
this.triggerMetadata = data.trigger_metadata;

/**
* An object containing information about an AutoMod rule action.
Expand All @@ -40,12 +46,6 @@ class AutoModRule extends Base {
*/
this.actions = data.actions;

/**
* The trigger metadata of the rule.
* @type {Object}
*/
this.triggerMetadata = data.trigger_metadata;

/**
* Whether this rule is enabled.
* @type {boolean}
Expand Down
4 changes: 2 additions & 2 deletions packages/discord.js/typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -278,10 +278,10 @@ export abstract class AnonymousGuild extends BaseGuild {
export class AutoModRule extends Base {
private constructor(client: Client, data: unknown);
public name: string;
public triggerType: number;
public eventType: number;
public actions: AutoModRuleAction[];
public triggerType: number;
public triggerMetadata: unknown;
public actions: AutoModRuleAction[];
public enabled: boolean;
public exemptRoles: Snowflake[];
public exemptChannels: Snowflake[];
Expand Down

0 comments on commit ec512c7

Please sign in to comment.