This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/** | |
* @param {number} ms Number of milliseconds to wait | |
* @returns Promise that resolves after the specified time | |
*/ | |
function wait(ms) { | |
return new Promise(resolve => setTimeout(resolve, ms)); | |
} | |
/** | |
* @param {string[]} codes Array of promo codes to try |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"100": "\uD83D\uDCAF", | |
"1234": "\uD83D\uDD22", | |
"grinning": "\uD83D\uDE00", | |
"grinning_face": "\uD83D\uDE00", | |
"smiley": "\uD83D\uDE03", | |
"smile": "\uD83D\uDE04", | |
"grin": "\uD83D\uDE01", | |
"laughing": "\uD83D\uDE06", | |
"satisfied": "\uD83D\uDE06", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// A really simple script that takes a string and formats it as regional indicators that don't turn into flags | |
// License: MIT (Go nuts, just don't sue me if it breaks something) | |
// Author: Sera Cutler, github\oppossome discord\opossum | |
// Creates a lookup table consisting of { a: "🇦\u200b", ... } | |
const REGIONAL_CHARACTERS = Object.fromEntries( | |
Array.from({ length: 26 }, (_, i) => [ | |
String.fromCodePoint(97 + i), | |
// Add a zero-width space to prevent the character from turning into a flag | |
`${String.fromCodePoint(0x1f1e6 + i)}\u200b`, |