-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
51 changed files
with
1,530 additions
and
702 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,17 @@ | ||
import { MessageReaction, User, Events as Event } from "discord.js"; | ||
import { Events } from "../../base"; | ||
import { MessageReaction, PartialMessageReaction, User } from "discord.js"; | ||
import { Events } from "../../base.js"; | ||
import { ExtendedClient } from "../../../Client"; | ||
import { ThingBoardManager } from "../../../managers/thingboard/init.js"; | ||
import { SocialsManager } from "../../../managers/socials/init.js"; | ||
|
||
export default new class MessageReactionAdd extends Events { | ||
public name = Event.MessageReactionAdd; | ||
public name = "messageReactionAdd" as const; | ||
public once = false; | ||
|
||
public execute(reaction: MessageReaction, user: User) { | ||
public execute(reaction: MessageReaction | PartialMessageReaction, user: User) { | ||
const client: ExtendedClient<true> = reaction.client; | ||
|
||
if (client.managers?.starboard && client.config?.starboard.enable) client.managers.starboard.checkReactions(reaction, user); | ||
if (client.managers?.thingboard instanceof ThingBoardManager && client.config?.thingboard?.enable) client.managers.thingboard.check(reaction, user); | ||
if (client.managers?.socials instanceof SocialsManager && client.config?.socials?.enable) client.managers.socials.check(reaction, user); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
import { ClientEvents } from "discord.js"; | ||
|
||
export abstract class Events { | ||
public abstract name: string; | ||
public abstract name: keyof ClientEvents; | ||
public abstract once: boolean; | ||
public abstract execute(this: Events, ...args: any[]): any; | ||
public abstract execute(this: Events, ...args: ClientEvents[typeof this.name]): any; | ||
} |
Oops, something went wrong.