direct messages are now redirected to main channel

This commit is contained in:
ayeuhugyu 2023-09-30 08:25:09 -07:00
parent b7492c8ad0
commit 94037a9e4b
2 changed files with 8 additions and 1 deletions

View file

@ -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._ **_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 - 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
--- ---

View file

@ -1,5 +1,6 @@
import * as dotenv from "dotenv"; import * as dotenv from "dotenv";
dotenv.config(); dotenv.config();
import { default as log } from "../util/log.js"; import { default as log } from "../util/log.js";
import fs from "fs"; import fs from "fs";
import discord from "discord.js"; import discord from "discord.js";
@ -34,7 +35,12 @@ export default function (message, client) {
"directmessages.log", "directmessages.log",
message, message,
import.meta.url, 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; if (!message.content.startsWith(prefix)) return;