@ -4,6 +4,7 @@ const { token, prefix, botID, statsChannel, ownerID, supportServer } = require('
const responseObject = require ( "./json/reply.json" ) ;
const delresponseObject = require ( "./json/delreply.json" ) ;
const reactObject = require ( "./json/react.json" ) ;
const imgResponseObject = require ( "./json/imgreply.json" ) ;
// Prefix and ownerID and invite to support server
const client = new CommandoClient ( {
@ -74,8 +75,11 @@ client.registry
// } else
// React to the message and send an auto response with it
if ( message . author . bot ) return ; {
if ( responseObject [ message _content ] && reactObject [ message _content ] ) {
// Reply with images as attachement
if ( imgResponseObject [ message _content ] ) {
message . channel . send ( { files : [ imgResponseObject [ message _content ] ] } ) ;
}
else if ( responseObject [ message _content ] && reactObject [ message _content ] ) {
message . channel . send ( responseObject [ message _content ] ) ;
message . react ( reactObject [ message _content ] ) ;
// React only to the messages