generated from nhcarrigan/template
This commit is contained in:
@@ -8,6 +8,4 @@
|
|||||||
|
|
||||||
export const responses = {
|
export const responses = {
|
||||||
dm: "Hiya! I am Naomi's personal assistant, so I am afraid I cannot help you. But I have forwarded your message to Naomi!",
|
dm: "Hiya! I am Naomi's personal assistant, so I am afraid I cannot help you. But I have forwarded your message to Naomi!",
|
||||||
naomiMentioned: "Hello~! It looks like you mentioned Naomi. I have notified her, and she will respond as soon as she can.",
|
|
||||||
teamMentioned: "Hello~! It looks like you mentioned our team. I have notified Naomi, and she will respond as soon as she can.",
|
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -6,7 +6,6 @@
|
|||||||
|
|
||||||
import { MessageFlags, type Message } from "discord.js";
|
import { MessageFlags, type Message } from "discord.js";
|
||||||
import { ids } from "../config/ids.js";
|
import { ids } from "../config/ids.js";
|
||||||
import { responses } from "../config/responses.js";
|
|
||||||
import { getComponentsForNaomi } from "../utils/getComponentsForNaomi.js";
|
import { getComponentsForNaomi } from "../utils/getComponentsForNaomi.js";
|
||||||
import { logger } from "../utils/logger.js";
|
import { logger } from "../utils/logger.js";
|
||||||
import type { Amari } from "../interfaces/amari.js";
|
import type { Amari } from "../interfaces/amari.js";
|
||||||
@@ -17,7 +16,7 @@ import type { Amari } from "../interfaces/amari.js";
|
|||||||
* @param amari -- Amari's instance.
|
* @param amari -- Amari's instance.
|
||||||
* @param message -- The guild message payload from Discord.
|
* @param message -- The guild message payload from Discord.
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line max-lines-per-function, complexity -- Mainly those reply options...
|
// eslint-disable-next-line complexity -- Mainly those reply options...
|
||||||
export const respondToMention = async(
|
export const respondToMention = async(
|
||||||
amari: Amari,
|
amari: Amari,
|
||||||
message: Message<true>,
|
message: Message<true>,
|
||||||
@@ -37,12 +36,6 @@ export const respondToMention = async(
|
|||||||
ignoreRepliedUser: true,
|
ignoreRepliedUser: true,
|
||||||
ignoreRoles: true,
|
ignoreRoles: true,
|
||||||
}) || /naomi/i.test(content)) {
|
}) || /naomi/i.test(content)) {
|
||||||
await message.reply({
|
|
||||||
allowedMentions: {
|
|
||||||
repliedUser: false,
|
|
||||||
},
|
|
||||||
content: responses.naomiMentioned,
|
|
||||||
});
|
|
||||||
await naomi.send(
|
await naomi.send(
|
||||||
{
|
{
|
||||||
components: getComponentsForNaomi(author, content, url),
|
components: getComponentsForNaomi(author, content, url),
|
||||||
@@ -59,12 +52,6 @@ export const respondToMention = async(
|
|||||||
ignoreRepliedUser: true,
|
ignoreRepliedUser: true,
|
||||||
ignoreRoles: true,
|
ignoreRoles: true,
|
||||||
}) || /nhcarrigan/i.test(content)) {
|
}) || /nhcarrigan/i.test(content)) {
|
||||||
await message.reply({
|
|
||||||
allowedMentions: {
|
|
||||||
repliedUser: false,
|
|
||||||
},
|
|
||||||
content: responses.naomiMentioned,
|
|
||||||
});
|
|
||||||
await naomi.send(
|
await naomi.send(
|
||||||
{
|
{
|
||||||
components: getComponentsForNaomi(author, content, url),
|
components: getComponentsForNaomi(author, content, url),
|
||||||
|
|||||||
Reference in New Issue
Block a user