Update chatbot configuration to include replying in DMs

This commit is contained in:
ShadowVirtual 2024-04-30 18:44:45 -08:00
parent 51472fadad
commit 30248e0475

View file

@ -252,7 +252,7 @@ module.exports = async (client, message) => {
};
// ChatBot
if (chatbot.State && chatbot.AllowedChannels.includes(message.channel.name) && !chatbot.IgnoredUsers.includes(message.author.id)) {
if (chatbot.State && ((chatbot.AllowedChannels.includes(message.channel.name) && message.channel.type !== 'DM') || (chatbot.ReplyInDMs && message.channel.type === 'DM')) && !chatbot.IgnoredUsers.includes(message.author.id)) {
// Check if the message is a direct message
if (message.channel.type === 'DM') {
// Handle direct message