Added 666 support, memes. Tweaked runloop
This commit is contained in:
parent
f4dc6e06a5
commit
5871cfde9e
|
|
@ -16,9 +16,27 @@ def handleTrueScrollMsg(slack, msg):
|
|||
response = "Could not parse your query. Please invoke as \"truescroll <scroll#>\""
|
||||
else:
|
||||
num = m.group(1)
|
||||
|
||||
|
||||
brotherScroll = getBrotherScroll(num)
|
||||
trueScroll = getTrueScroll(num)
|
||||
|
||||
#Correct for 666 (thanks TREVOR)
|
||||
#Offset broscroll by one if >= 666
|
||||
if int(brotherScroll) >= 666:
|
||||
brotherScroll = getBrotherScroll(str(int(num) + 1))
|
||||
|
||||
#Offset truescroll in opposite direction
|
||||
if int(num) > 666:
|
||||
trueScroll -= 1
|
||||
|
||||
|
||||
#Memes
|
||||
if int(num) == 666:
|
||||
trueScroll = "spookiest"
|
||||
elif "3" in num:
|
||||
trueScroll = "worst"
|
||||
|
||||
response = "The brother with scroll {0} is in fact the {1} brother to sign\n"
|
||||
response += "The {2} brother to sign will have scroll {3}\n"
|
||||
|
||||
|
|
@ -30,14 +48,17 @@ def handleTrueScrollMsg(slack, msg):
|
|||
brotherNums = [str(x) for x in range(10) if (not x == 3)]
|
||||
trueNums = [str(x) for x in range(10)]
|
||||
|
||||
#Returns string
|
||||
def getTrueScroll(brotherScroll):
|
||||
return convertBase(brotherScroll, brotherNums, trueNums)
|
||||
|
||||
|
||||
#Returns string
|
||||
def getBrotherScroll(trueScroll):
|
||||
return convertBase(trueScroll, trueNums, brotherNums)
|
||||
|
||||
|
||||
#Returns string
|
||||
def convertBase(numStr, srcBaseNums, targBaseNums):
|
||||
#Returns int value
|
||||
def numberFromBase(ns, numerals):
|
||||
|
|
@ -57,7 +78,7 @@ def convertBase(numStr, srcBaseNums, targBaseNums):
|
|||
|
||||
return total
|
||||
|
||||
#Returns string array, each elt is the corresponding numeral
|
||||
#Returns string, each elt is the corresponding numeral
|
||||
def numberToBase(n, numerals):
|
||||
if n==0:
|
||||
return [0]
|
||||
|
|
|
|||
|
|
@ -6,8 +6,8 @@
|
|||
while :
|
||||
do
|
||||
echo "Press [CTRL+C] to stop..."
|
||||
sleep 5
|
||||
python3 WaitonBot.py
|
||||
sleep 1
|
||||
python3 WaitonBot.py
|
||||
sleep 3
|
||||
python3 CallOfTheVoid.py
|
||||
done
|
||||
|
|
|
|||
Loading…
Reference in New Issue