-
-
Save tt024/fe708778efd7d1bbe0920c7e0897b271 to your computer and use it in GitHub Desktop.
const Discord = require("discord.js"); | |
const client = new Discord.Client(); | |
const {get} = require("snekfetch"); | |
const TOKEN = 'YOUR_BOT_TOKEN_HERE' | |
const PREFIX = ";;"; | |
client.on('message', message => { | |
if (message.content.startsWith(PREFIX + 'cat')) { | |
try { | |
get('https://aws.random.cat/meow').then(response => { | |
message.channel.send({files: [{attachment: response.body.file, name: `cat.${response.body.file.split('.')[4]}`}]}); | |
console.log('random cat picture'); | |
}) | |
} catch (e) { | |
console.log('error!'); | |
} | |
}; | |
}); | |
client.login(TOKEN); | |
// from https://github.com/trrb |
Ya
Is it possible to put the image inside a Richembed?
Yes
it sends the image as a .dream file :/
it sends the image as a .dream file :/
yes same pls help
it sends the image as a .dream file :/
yes same pls help
The API has changed, I'll fix that.
Thanks for the report :)
it sends the image as a .dream file :/
yes same pls help
Fixed! :-)
Is it possible to change the link to another link?
Is it possible to change the link to another link?
Yep, it's quite possible with another API.
You'll just have to tweak line 12 to adapt the other API to the link it will give.
i want to make it so it sends disney pictures but idk how
help me this is my err
TypeError: Class constructor Snekfetch cannot be invoked without 'new'
Snekfetch is depreciated
what can i use instead
Is it possible to put the image inside a Richembed?