generated from nhcarrigan/template
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @copyright NHCarrigan
|
||||
* @license Naomi's Public License
|
||||
* @author Naomi Carrigan
|
||||
*/
|
||||
|
||||
import { respondToMention } from "../modules/respondToMention.js";
|
||||
import { updateMentorshipThread } from "../modules/updateMentorshipThread.js";
|
||||
import type { Amari } from "../interfaces/amari.js";
|
||||
import type { Message } from "discord.js";
|
||||
|
||||
/**
|
||||
* Handles the message create event from Discord.
|
||||
* Bootstraps all of our custom logic modules.
|
||||
* @param amari -- Amari's instance.
|
||||
* @param message -- The guild message payload from Discord.
|
||||
*/
|
||||
export const handleMessageCreate = async(
|
||||
amari: Amari,
|
||||
message: Message<true>,
|
||||
): Promise<void> => {
|
||||
if (message.author.bot || message.system) {
|
||||
return;
|
||||
}
|
||||
await updateMentorshipThread(amari, message);
|
||||
await respondToMention(amari, message);
|
||||
};
|
||||
Reference in New Issue
Block a user