Shape's actual name is not always the same as it's Discord display name
This commit is contained in:
parent
b45178cbfd
commit
b05d765497
@ -4,5 +4,6 @@
|
|||||||
"admin": "593524756393754635",
|
"admin": "593524756393754635",
|
||||||
"shapeGuild": "1277635303363973173",
|
"shapeGuild": "1277635303363973173",
|
||||||
"shapeChannel": "1277652579547086860",
|
"shapeChannel": "1277652579547086860",
|
||||||
"shapeUserId": "1277634934781120542"
|
"shapeUserId": "1277634934781120542",
|
||||||
|
"shapeName": "pranker"
|
||||||
}
|
}
|
3
index.js
3
index.js
@ -56,8 +56,7 @@ async function getMessageContent(message) {
|
|||||||
|
|
||||||
function filterPrompt(string) {
|
function filterPrompt(string) {
|
||||||
const clientUser = client.user;
|
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(clientUser.displayName, config.shapeName);
|
||||||
return string.replace(clientUser.id, config.shapeUserId).replace(shapeUser.displayName, clientUser.displayName);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
async function sendToAI(message) {
|
async function sendToAI(message) {
|
||||||
|
Loading…
Reference in New Issue
Block a user