Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const request = require('request');
- exports.run = (message, bot, send) => {
- let cn = request("http://api.adviceslip.com/advice", function(err, res, body) {
- try {
- let cnj = JSON.parse(body)
- message.channel.send(cnj.slip.advice)
- } catch (e) {
- return send("**Advice machine :b:roke**")
- }
- });
- }
Add Comment
Please, Sign In to add comment