Skip to content

Commit

Permalink
Format using prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
AlenVelocity committed May 29, 2021
1 parent 5acd984 commit 2ec8337
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/lib/getGify.ts
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
import { MessageType, Mimetype } from '@adiwajshing/baileys'
import { IReply } from '../Typings'
import Utils from '../Utils'
import Utils from '../Utils'

/** Side-note
* To get gif in other formats, I'd recommed you exploring the json itself which provided link returns.
* This stability of the url and API_KEY is not guaranteed
* Regards ~ Somnath Das
*/
* To get gif in other formats, I'd recommed you exploring the json itself which provided link returns.
* This stability of the url and API_KEY is not guaranteed
* Regards ~ Somnath Das
*/
const getGify = async (keyword: string): Promise<string | null> => {
// Fetching gif json by providing keyword
const data: { results: IGifyResponse[] } = await Utils.fetch(
Expand All @@ -16,7 +16,6 @@ const getGify = async (keyword: string): Promise<string | null> => {
return data.results?.[Math.floor(Math.random() * data.results.length)]?.media[0]?.mp4?.url
}


export const getGifReply = async (query: string, users?: [string, string]): Promise<IReply> => {
if (!query) return { body: `Please Provide the query to search for!` }
const gif = await getGify(query)
Expand Down

0 comments on commit 2ec8337

Please sign in to comment.