@aidarkezio/main-func
Version:
📦 It has my funcs
11 lines (10 loc) • 344 B
text/typescript
import got from 'got'
export let bucinjson: string[] = []
export default async function bucin (): Promise<string> {
if (!bucinjson.length) {
bucinjson = await got(
'https://raw.githubusercontent.com/BochilTeam/database/master/kata-kata/bucin.json'
).json()
}
return bucinjson[Math.floor(bucinjson.length * Math.random())]
}