This commit is contained in:
pixtaded 2024-08-31 17:54:44 +03:00
parent cd3f83ffd7
commit b45178cbfd

View File

@ -55,7 +55,9 @@ async function getMessageContent(message) {
}
function filterPrompt(string) {
return string.replace(client.user.id, config.shapeUserId).replace(client.guilds.cache.get(config.shapeGuild).members.cache.get(config.shapeUserId));
const clientUser = client.user;
const shapeUser = client.guilds.cache.get(config.shapeGuild).members.cache.get(config.shapeUserId).user;
return string.replace(clientUser.id, config.shapeUserId).replace(shapeUser.displayName, clientUser.displayName);
}
async function sendToAI(message) {