Last active
March 2, 2019 21:04
-
-
Save cameroncros/394cd31cc1deb154b1387647f52def93 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const Discord = require('discord.js'); | |
const client = new Discord.Client(); | |
channel = "" | |
function send_message() { | |
channel.send({embed: { | |
title: "This should be the title", | |
description: "This is some text", | |
image: { | |
url: "attachment://image.png" | |
} | |
}, | |
files: [{ attachment: 'images/image.jpg', name: 'image.png' }] | |
}); | |
} | |
client.on('ready', () => { | |
console.log(`Logged in as ${client.user.tag}!`); | |
}); | |
client.on('message', msg => { | |
if (msg.content === 'ping') { | |
channel = msg.channel | |
send_message() | |
} | |
}); | |
client.login('token') |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment