gif command discordjs

Solutions on MaxInterview for gif command discordjs by the best coders in the world

showing results for - "gif command discordjs"
Giada
01 Sep 2018
1        if(command === "gif"){
2          	const gifSearch =require('gif-search');
3            const gif = args.join(" ")
4            try{
5            gifSearch.query(gif).then((gifurl) =>{
6                const embed = new discord.MessageEmbed()
7                    .setTitle("Result for "+saymessage)
8                    .setImage(gifurl)
9                    .setFooter("Requested by "+message.author.username)
10                message.channel.send(embed)
11            }).catch(error)}
12            catch(error){message.channel.send("NO gif found")}
13        }
14		//I hope it helps ;)