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
function decodeString(encodedStr) { | |
let decoded = '', word = ''; | |
for (let i = 0; i < encodedStr.length; i++) { | |
const char = encodedStr[i]; | |
if (!isNaN(char)) { | |
word += String.fromCharCode(parseInt(char) + 64); | |
} else if (char === ' ') { | |
decoded += word + ' '; | |
word = ''; |
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
function getRandElement(elements) { | |
return elements[Math.floor(Math.random() * elements.length)]; | |
} | |
function r() { | |
return getRandElement(["pozhar", "POTOP", "POTOM"]); | |
} | |
function generateMessage() { | |
const results = [r(), r(), r(), r()]; |
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
const gambleEmotes = ["GAMBA", "catGAMBLING", "IVEPLAYEDTHESEGAMESBEFORE", "Loodomanych", "Opachki"]; | |
const symbols = ["🥕", "🍒", "🔔", "❌"]; | |
let availableEmotes = []; | |
function loadEmotes() { | |
return new Promise((resolve, reject) => { | |
utils.fetchEmotes().then(emotes => { | |
const emoteNames = Object.values(emotes).map(emote => emote.name); | |
availableEmotes = gambleEmotes.filter(emote => emoteNames.includes(emote)); | |
resolve(); |
NewerOlder