Fix bot sending eval to AI.

This commit is contained in:
pixtaded 2024-08-30 17:57:26 +03:00
parent d26b802b8d
commit 29b80ff98b

View File

@ -56,7 +56,11 @@ async function getMessageContent(message) {
async function sendToAI(message) {
if (message.author.id == client.user.id) return;
if (message.author.id == config.admin && message.content.startsWith("e ")) eval(message.content.substring(1));
if (message.author.id == config.admin && message.content.startsWith("e ")) {
eval(message.content.substring(1));
return;
}
savedMessage = message;
client.guilds.cache.get(shapeGuild).channels.cache.get(config.shapeChannel).send(await getMessageContent(message));