Skip to content

Instantly share code, notes, and snippets.

/*
no :)
*/
@trueharuu
trueharuu / pylon-spotify.ts
Created January 23, 2021 00:52
Get info on a song on Spotify using Pylon and Slash Commands
export async function api(
url: string,
type: 'json' | 'text' | 'buffer' = 'json'
) {
const a = await fetch(url);
switch (type) {
case 'buffer':
return await a.arrayBuffer();
case 'text':
return await a.text();
@trueharuu
trueharuu / numToWords.ts
Last active October 18, 2022 00:11
num to word
function arr(x: any) {
return Array.from(x);
}
function num(x: any) {
return Number(x) || 0;
}
function str(x: any) {
return String(x);
}
function isEmpty(xs: any) {