generated from nhcarrigan/template
This commit is contained in:
@@ -18,10 +18,7 @@ import { logger } from "../utils/logger.js";
|
|||||||
export const processMessage = async(message: Message): Promise<void> => {
|
export const processMessage = async(message: Message): Promise<void> => {
|
||||||
try {
|
try {
|
||||||
const { content, author, system } = message;
|
const { content, author, system } = message;
|
||||||
if (author.bot || system) {
|
if (author.bot || system || content.length <= 0) {
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (content.length <= 0) {
|
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
const noCodeBlocks = replaceCodeBlocks(content, () => {
|
const noCodeBlocks = replaceCodeBlocks(content, () => {
|
||||||
@@ -58,7 +55,9 @@ export const processMessage = async(message: Message): Promise<void> => {
|
|||||||
type: 1,
|
type: 1,
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
flags: [ MessageFlags.IsComponentsV2 ] });
|
flags: [ MessageFlags.IsComponentsV2 ] }).catch(() => {
|
||||||
|
return null;
|
||||||
|
});
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (error instanceof Error) {
|
if (error instanceof Error) {
|
||||||
await logger.error("process message module", error);
|
await logger.error("process message module", error);
|
||||||
|
|||||||
Reference in New Issue
Block a user