Shape's actual name is not always the same as it's Discord display name

This commit is contained in:
pixtaded 2024-08-31 18:01:46 +03:00
parent b45178cbfd
commit b05d765497
2 changed files with 3 additions and 3 deletions

View File

@ -4,5 +4,6 @@
"admin": "593524756393754635",
"shapeGuild": "1277635303363973173",
"shapeChannel": "1277652579547086860",
"shapeUserId": "1277634934781120542"
"shapeUserId": "1277634934781120542",
"shapeName": "pranker"
}

View File

@ -56,8 +56,7 @@ async function getMessageContent(message) {
function filterPrompt(string) {
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);
return string.replace(clientUser.id, config.shapeUserId).replace(clientUser.displayName, config.shapeName);
}
async function sendToAI(message) {