Add custom variables to custom message feature

This commit is contained in:
SileNce5k 2021-07-04 12:48:06 +02:00
parent 67f674c92b
commit 9bb9effaf7
No known key found for this signature in database
GPG key ID: C507260E7F2583AD
3 changed files with 30 additions and 2 deletions

View file

@ -27,7 +27,8 @@ module.exports = function(client, owners, message, globalPrefix){
let customCommands = JSON.parse(json)
customCommands.forEach(function (customCommand) {
if (customCommand.customName === commandName) {
message.channel.send(customCommand.customMessage)
let customMessage = customReplaceWithVariables(customCommand.customMessage, message, prefix, globalPrefix)
message.channel.send(customMessage)
}
});
}