can we add a string to the command content response by PreMessageContentRun ?

Like i have in my messageRun command file: message.channel.send(‘hi’) In the event file, i use like: payload.messageContent += ‘ everyone’ then bot’ll send to channel: hi everyone
3 Replies
Favna
Favna7mo ago
There is no event called PreMessageContentRun nor will there ever be for it would mean editing the prototype function of the Message and overriding the function. If you want to add the same string a lot of times just store it as s constant and use template tags to insert it or wrap your string in a function to do the same.
а к а й с
а к а й сOP7mo ago
So sorry, i mean PreMessageCommandRun I just want a global listener to do all of that
Favna
Favna7mo ago
Well sapphire doesn't support that nor will we because it promotes bad code quality and bad practises. You'll have to write your own code for this, as I'll advised as it is.
Want results from more Discord servers?
Add your server