From 94037a9e4b2920e24771a312c37712a4520a7565 Mon Sep 17 00:00:00 2001 From: ayeuhugyu Date: Sat, 30 Sep 2023 08:25:09 -0700 Subject: [PATCH] direct messages are now redirected to main channel --- README.md | 1 + src/events/messageCreate.js | 8 +++++++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 927138f..81e0be3 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,7 @@ clean up p/vileimagery, its horrendous **_Note:_** _versions before this were not uploaded to the repo, this is not the first version._ 1.12 - changed most discord actions to be handled by 1 script. this should cut down on errors and allow you to actually use the bot in other servers (i think) + 1.12.1 - direct messages are now redirected to main channel --- diff --git a/src/events/messageCreate.js b/src/events/messageCreate.js index ca33235..7b3993e 100644 --- a/src/events/messageCreate.js +++ b/src/events/messageCreate.js @@ -1,5 +1,6 @@ import * as dotenv from "dotenv"; dotenv.config(); + import { default as log } from "../util/log.js"; import fs from "fs"; import discord from "discord.js"; @@ -34,7 +35,12 @@ export default function (message, client) { "directmessages.log", message, import.meta.url, - `direct message from ${message.author.username} (${message.author}) with: "${message.content}"` + `direct message from ${message.author.username} (${message.author}) with: +"${message.content}"` + ); + const channel = client.channels.cache.get("1148814162273763418"); + channel.send( + `direct message from ${message.author.username} (\`${message.author.id}\`) with: "${message.content}"` ); } if (!message.content.startsWith(prefix)) return;