lets you browse across twitch! you can change the prefix if you want! enjoy coding :)
const lib = require('lib')({token: process.env.STDLIB_SECRET_TOKEN});
let search = context.params.event.content.split(' ').splice(1).join('%20');
let result = `https://www.twitch.tv/search?term=${search}`
let message = context.params.event.content;
if(message.startsWith(`;twitch`)) {
await lib.discord.channels['@0.0.6'].messages.create({
channel_id: `${context.params.event.channel_id}`,
content: ``,
embed: {
title: `Your twitch search.`,
description: ``,
url: `https://www.twitch.tv/search?term=${search}`,
color: 0xFF80ED,
thumbnail: {
url: `https://images-ext-1.discordapp.net/external/NpCWiqC2C_Ixp7mhU-PXKgfRPEPhjuOlPO2K1egHPVk/https/blog.twitch.tv/assets/uploads/01-twitch-logo.jpg?width=576&height=384`,
height: 0,
width: 0,
}
}
});
}