This file contains 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 jibber(length, punctuate, punctuationMarks, wordLengthLimit, mimicEnglishPractices) { | |
length = typeof length !== `undefined` ? length : 1; | |
punctuate = typeof punctuate !== `undefined` ? punctuate : false; | |
punctuationMarks = typeof punctuationMarks !== `undefined` ? punctuationMarks : [".", "!", "?", "..."]; | |
const cv = 'aeiou'; | |
const cc = 'bcdfghjklmnprstvw'; | |
const ccx = 'qxzy'; | |
const cca = 'bcdfghjklmnpqrstvwxyz' |
This file contains 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
/* | |
simple colored console message prefixes | |
Usage: | |
const Loginator = require(`./loginator.js`) | |
const logger = new Loginator(4, false, { | |
"info": {fg: "brightblack", bg: "white"}, | |
"chat": {fg: "white", bg: "brightblack"}, | |
"warn": {fg: "brightwhite", bg: "yellow"}, | |
"uhoh": {fg: "yellow", bg: "red"}, |
This file contains 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 axios = require('axios'); | |
const url = `https://discord.com/api/webhooks/<webhookid>/<webhooktoken>` | |
// initially post a message | |
// "?wait=true" url param tells discord to return a message object so we can get the id of it | |
axios.post(`${url}?wait=true`, { | |
content: "hi, test. this is the first message." | |
}).then((response) => { | |
// use PATCH method to edit webhooks |
This file contains 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
// use with @prismarinejs/mineflayer | |
// if you don't know what a session token/access token is, don't bother with this; it's for the silliest of devs | |
const mineflayer = require(`mineflayer`) | |
const config = { | |
host: `example.com`, | |
port: 25565, | |
token: `eyJraWQiOiJhYzg0YSIsImFsZyI6IkhTMjU2In0.eyJ4dWlkIjoiMjUzNTQ...` | |
} |
This file contains 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
// thanks to gapple.pw for the very well made docs (https://mojang-api-docs.gapple.pw/) | |
// thanks to wiki.vg for teaching me microsoft auth scheme (https://wiki.vg/Microsoft_Authentication_Scheme) | |
const axios = require(`axios`) | |
async function getUsernameAndUUID(bearerToken) { | |
try { | |
const url = 'https://api.minecraftservices.com/minecraft/profile'; | |
const config = { | |
headers: { |