Skip to content

Instantly share code, notes, and snippets.

@ZTRdiamond
Created November 12, 2024 00:41
Show Gist options
  • Select an option

  • Save ZTRdiamond/533d4cd272d39fdb18b2e641aa61f460 to your computer and use it in GitHub Desktop.

Select an option

Save ZTRdiamond/533d4cd272d39fdb18b2e641aa61f460 to your computer and use it in GitHub Desktop.
Search for stickers on stickers.cloud
import axios from "axios";
/*
Created by https://github.com/ztrdiamond !
Source: https://whatsapp.com/channel/0029VagFeoY9cDDa9ulpwM0T
"Aku janji jika hapus watermark ini maka aku rela miskin hingga 7 turunan"
*/
async function stickers(query, page = 1) {
try {
return await new Promise(async(resolve, reject) => {
axios.get(`https://api.stickers.cloud/v1/packs/search?query=${query}&page=${page}`, {
headers: {
origin: "https://stickers.cloud",
referer: "https://stickers.cloud/"
}
}).then(res => {
const data = res.data;
if(!data.success) return reject("failed fetch stickers");
let stickers = [];
data.result.data.map(d => d.stickers.map(d => stickers.push(d.sticker_src)));
resolve({
success: true,
stickers
})
}).catch(e => reject(e.response.data))
})
} catch (e) {
return {
success: false,
errors: e
}
}
}
export default stickers;
@ZTRdiamond
Copy link
Author

Usage

stickers("hololive")
  .then(console.log)
  .catch(console.log)

Output

{
  success: Boolean
  stickers: Array<String>
}

"yang timpa atau ganti watermark dimanapun atau sudah diganti duluan, jadi miskin + stroke + kanker + diabetes + mandul"

🗣️: jgn lupa pasang wm "aku berjanji" ygy🔥
😏: gk peduli gwe🤙

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment