From b05d765497654ac767adac59a9373194c8a027f6 Mon Sep 17 00:00:00 2001 From: pixtaded Date: Sat, 31 Aug 2024 18:01:46 +0300 Subject: [PATCH] Shape's actual name is not always the same as it's Discord display name --- config.example.json | 3 ++- index.js | 3 +-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/config.example.json b/config.example.json index 07d4c7a..f660983 100644 --- a/config.example.json +++ b/config.example.json @@ -4,5 +4,6 @@ "admin": "593524756393754635", "shapeGuild": "1277635303363973173", "shapeChannel": "1277652579547086860", - "shapeUserId": "1277634934781120542" + "shapeUserId": "1277634934781120542", + "shapeName": "pranker" } \ No newline at end of file diff --git a/index.js b/index.js index 8663115..4ca33ac 100644 --- a/index.js +++ b/index.js @@ -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) {