gif command discordjs
if(command === "gif"){
const gifSearch =require('gif-search');
const gif = args.join(" ")
try{
gifSearch.query(gif).then((gifurl) =>{
const embed = new discord.MessageEmbed()
.setTitle("Result for "+saymessage)
.setImage(gifurl)
.setFooter("Requested by "+message.author.username)
message.channel.send(embed)
}).catch(error)}
catch(error){message.channel.send("NO gif found")}
}
//I hope it helps ;)
Also in JavaScript:
- adding all elements in an array javascript
- how to copy text from input through button click js
- reduce method in javascript array of bjects
- ssh tunnel connect to mongodb in node.js
- javascript convert comma separated string to array
- Javascript parse json string
- jquery get value of radio input
- ojs link contact page
- js get query param
- html form not submit on enter
- javascript redirect function
- Postfix increment
- how to create a constant in javascript
- password validation with regular expression in javascript
- sjson.Set query
- ctx.fillstyle
- how to delete a variable in js
- discord js kick user
- js random minus
- javascript .firstordefault
- jqery get text
- graphql react filtering
- create component angular inline template
- how to append in javascript