Surf Tiktok and find your favorite videos and creators! All you need is a slash command with a string option. Have fun!
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let search = context.params.event.data.options[0].value;
let result = `https://www.tiktok.com/search?q=${search}`;
let message = context.params.event.content;
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
embed: {
title: ` `,
description: ``,
color: 00000,
author: {
name: `Tik Tok Search`,
icon_url: `https://sf-tb-sg.ibytedtos.com/obj/eden-sg/uhtyvueh7nulogpoguhm/tiktok-icon2.png`,
},
fields: [
{
name: `Search results for: ${search}`,
value: `Here is your [Link](https://www.tiktok.com/search?q=${search})`,
},
],
footer: {
text: `Requested by ${context.params.event.member.user.username}#${context.params.event.member.user.discriminator}`,
},
timestamp: `${new Date().toISOString()}`,
},
});