generated from nhcarrigan/template
fix: only respond to direct pings, ignore bots
Node.js CI / Lint and Test (push) Failing after 1m11s
Node.js CI / Lint and Test (push) Failing after 1m11s
This commit is contained in:
@@ -18,13 +18,16 @@ import type { Client, Message, OmitPartialGroupDMChannel } from "discord.js";
|
|||||||
* @param hikari - Hikari's Discord instance.
|
* @param hikari - Hikari's Discord instance.
|
||||||
* @param message - The message payload from Discord.
|
* @param message - The message payload from Discord.
|
||||||
*/
|
*/
|
||||||
// eslint-disable-next-line max-lines-per-function -- This function is large, but it handles a lot of logic.
|
// eslint-disable-next-line max-lines-per-function, complexity -- This function is large, but it handles a lot of logic.
|
||||||
const guildMessageCreate = async(
|
const guildMessageCreate = async(
|
||||||
hikari: Client,
|
hikari: Client,
|
||||||
message: Message<true>,
|
message: Message<true>,
|
||||||
): Promise<void> => {
|
): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
if (!hikari.user || !message.mentions.has(hikari.user.id)) {
|
if (!hikari.user || !message.mentions.has(hikari.user.id, {
|
||||||
|
ignoreEveryone: true,
|
||||||
|
ignoreRoles: true,
|
||||||
|
}) || message.author.bot) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
await message.channel.sendTyping();
|
await message.channel.sendTyping();
|
||||||
|
|||||||
Reference in New Issue
Block a user