This commit is contained in:
SpudGunMan
2025-10-25 12:59:59 -07:00
parent da7035dfed
commit d7a37ce9f1
2 changed files with 7 additions and 7 deletions
+4 -2
View File
@@ -178,10 +178,12 @@ def sendWithEmoji(message):
i += 1
return ' '.join(words)
def tell_joke(nodeID=0, vox=False):
def tell_joke(nodeID=0, vox=False, test=False):
dadjoke = Dadjoke()
if test:
return sendWithEmoji(dadjoke.joke)
try:
if dad_jokes_emojiJokes or vox:
if dad_jokes_emojiJokes:
renderedLaugh = sendWithEmoji(dadjoke.joke)
else:
renderedLaugh = dadjoke.joke
+3 -5
View File
@@ -146,9 +146,9 @@ class TestBot(unittest.TestCase):
##### GAMES Tests #####
def test_jokes(self):
from modules.games.joke import tell_joke
self.assertIsInstance(tell_joke(), str)
haha = tell_joke(nodeID=0, test=True)
print("Joke response:", haha)
self.assertIsInstance(haha, str)
def test_tictactoe_initial_and_move(self):
from games.tictactoe import tictactoe
@@ -161,7 +161,6 @@ class TestBot(unittest.TestCase):
print("After move '1':", second)
self.assertIsInstance(initial, str)
self.assertIsInstance(second, str)
def test_playVideoPoker(self):
from games.videopoker import playVideoPoker
@@ -175,7 +174,6 @@ class TestBot(unittest.TestCase):
self.assertIsInstance(initial, str)
self.assertIsInstance(after_bet, str)
def test_play_blackjack(self):
from games.blackjack import playBlackJack
user_id = "testuser"