get random reddit image link
case "pic":
if (!args[1]) return message.channel.send("Enter a title (Be VERY specific");
// pics was set equal to "https://www.reddit.com/r/pics.json" earlier
snekfetch.get(pics).then(r => {
let postTitle = args[1];
let img = r.preview.images[0].source.url;
let entry = r.find(post => post.title == postTitle);
let picture = new Discord.RichEmbed()
.setAuthor(entry.title)
.addField(entry)
.setImage(img);
message.channel.send(picture);
//message.channel.send(entry.preview.images[0].source.url);
});
break;
Also in JavaScript:
- DataTables warning: table id=example-dt - Invalid JSON response.
- google analytics nextjs
- jquery get value radio by name
- how to use await to console
- backgroundImage react
- data binding on checkbox angular
- first n elements of array js
- fetch api
- left_field in jsgrid
- js get anchor
- random color generator javascript
- match ids from 2 arrays in javascript asynchronous programming
- how to add oAuth google signin in react native app
- how to scroll through an object js
- regular expression to remove empty lines after text
- how to download and install ssms in windows 10
- get query parameters in node.js
- lastindexof javascript
- javascript confirm yes no
- how to display first value of an array in jquery
- set dynamic route in link react js
- how to select second element in jquery
- javascript set class
- javascript genreate number id