From 1d93c75057f356c9d4132fb6e2b4471b2a0108c3 Mon Sep 17 00:00:00 2001 From: swee Date: Sat, 21 Dec 2024 14:24:01 -0800 Subject: [PATCH] Update sweebot.py --- sweebot.py | 43 +++++++++++++++++++++++++++++++------------ 1 file changed, 31 insertions(+), 12 deletions(-) diff --git a/sweebot.py b/sweebot.py index 47e18ea..846abff 100644 --- a/sweebot.py +++ b/sweebot.py @@ -474,14 +474,24 @@ while True: elif command[0] == "$patpat" or command[0] == "$headpat": if len(command) == 2: - for i in range(0,int(command[1])): - happiness += (1 if happiness != 10 else 0) + if int(command[1]) < 50: + for i in range(0,int(command[1])): + happiness += (1 if happiness != 10 else 0) + else: + happiness = 10 elif len(command) == 1: happiness += (1 if happiness != 10 else 0) - multiline(choice(pats) + " (Emotion: Upset " + - ("#" * int(happiness)) + - ("-" * int(10-happiness)) + " Happy)", - channel) + if int(command[1]) < 50: + multiline(choice(pats) + " (Emotion: Upset " + + ("#" * int(happiness)) + + ("-" * int(10-happiness)) + " Happy)", + channel) + else: + multiline("Okay that's enough!!" + " (Emotion: Upset " + + ("#" * int(happiness)) + + ("-" * int(10-happiness)) + " Happy)", + channel) + elif command[0] == "$emotion": multiline("Emotion: Upset " + ("#" * int(happiness)) + @@ -489,14 +499,23 @@ while True: channel) elif command[0] == "$bap": if len(command) == 2: - for i in range(0,int(command[1])): - happiness -= (1 if happiness != 0 else 0) + if int(command[1]) < 50: + for i in range(0,int(command[1])): + happiness -= (1 if happiness != 0 else 0) + else: + happiness = 0 elif len(command) == 1: happiness -= (1 if happiness != 0 else 0) - multiline(choice(baps) + " (Emotion: Upset " + - ("#" * int(happiness)) + - ("-" * int(10-happiness)) + " Happy)", - channel) + if int(command[1]) < 50: + multiline(choice(baps) + " (Emotion: Upset " + + ("#" * int(happiness)) + + ("-" * int(10-happiness)) + " Happy)", + channel) + else: + multiline("Okay that's enough!!" + " (Emotion: Upset " + + ("#" * int(happiness)) + + ("-" * int(10-happiness)) + " Happy)", + channel) elif command[0] == "$meow": if random(1,100) > (happiness*10): multiline(choice(meows_upset), channel)