schmich / dankbot

Hanging out at http://twitch.tv/jansoon
Other
4 stars 3 forks source link

!knightme #12

Open schmich opened 8 years ago

schmich commented 8 years ago

!knightme

adjHashBytes = sha256(name.trim.lower)
adjBigId = BigIntFromBytes(adjHashBytes)
adjIndex = BigMod(bigId, BigInt(adjectives.length))
adj = adjectives[int(adjIndex)]

nounHashBytes = sha256(name.trim.lower.reverse)
nounBigId = BigIntFromBytes(nounHashBytes)
nounIndex = BigMod(bigId, BigInt(nouns.length))
noun = nouns[int(nounIndex)]

"You are henceforth known as #{name} the #{adj} #{noun}"