Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on("message", message => {
- if(message.content.startsWith('$image')){
- let gg = message.mentions.channels.first();
- if(!gg) return message.channel.send(new Discord.RichEmbed()
- .setDescription(`\`\`\`The way to use the command is \`\`\``)
- .addField('**Example**',`> ** ${prefix}image [#channel] "URL" **`)
- .setFooter(message.author.tag)
- .setTimestamp());
- let jj = message.content.split(/ +/).slice(2).join(' ');
- if(!jj) return message.channel.send(new Discord.RichEmbed()
- .setDescription(`\`\`\`The way to use the command is \`\`\``)
- .addField('**Example**',`> ** ${prefix}image [#channel] "URL" **`)
- .setFooter(message.author.tag)
- .setTimestamp());message.guild.channels.get(gg.id).send({
- files: [{ name:"Uranus.png", attachment:jj}]
- }).catch(yy => { message.channel.send("Invaild URL")});
- //message.channel.send('Done').then(ff => ff.react("✅")).catch(yy => {});
- message.delete();
- }})
Add Comment
Please, Sign In to add comment