Added reply with images as attachement
This commit is contained in:
parent
69ee6c644e
commit
466151b8d7
3 changed files with 9 additions and 3 deletions
8
index.js
8
index.js
|
@ -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
|
||||
|
|
3
json/imgreply.json
Normal file
3
json/imgreply.json
Normal file
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"nibba": "https://pbs.twimg.com/media/Dnh887DXcAECKx6.jpg"
|
||||
}
|
|
@ -1,7 +1,6 @@
|
|||
{
|
||||
"haha yes": "haha very yes",
|
||||
"nigger": "nigger LOL get it xD I said nigger HAHHAHAHAHAHA get it cuz its not socially acceptable to say nigger so its funny ROFL saaaayyy NIGGER LMFAOOOO",
|
||||
"nibba": "https://pbs.twimg.com/media/Dnh887DXcAECKx6.jpg",
|
||||
"lol": "veri fun",
|
||||
"my nama jeff": "my namaaaaa jeeeeeeeeeffff",
|
||||
"des": "PA\nCITO",
|
||||
|
|
Loading…
Reference in a new issue