@@ -105,21 +105,23 @@ async def on_ready():
105105 await TBotD .add_cog (tbdtools .TBDTools (TBotD , connection ))
106106
107107
108- async def grok (ctx ):
108+ async def grok (message ):
109109 answer = ""
110- rng = random .randint (1 , 100 )
111- if 1 <= rng < 40 :
110+ rng = random .randint (0 , 99 )
111+ if 0 <= rng < 30 :
112112 answer = "yeah"
113- elif 40 <= rng < 80 :
113+ elif 30 <= rng < 60 :
114114 answer = "nah"
115+ elif 60 <= rng < 80 :
116+ answer = await fetch_random_verse ()
115117 else :
116118 answer = random .choice ([
117119 "meditate upon it and become wiser" ,
118120 "hmmmmm yeah nah, mhmmm maybe, idk" ,
119121 "😏" ,
120122 "As a large language model I can't help you with this request." ,
121123 ])
122- await ctx .reply (answer )
124+ await message .reply (answer )
123125
124126
125127@TBotD .event
@@ -128,7 +130,7 @@ async def on_message(message):
128130 if message .author .bot :
129131 return
130132 if "grok is this true" in message .content .lower ():
131- await grok (ctx )
133+ await grok (message )
132134 if message .guild is None :
133135 return
134136 connection = TBotD .db_connection
@@ -316,7 +318,7 @@ async def bottle(ctx: commands.Context):
316318async def bible (ctx : commands .Context ):
317319 bl .log (bible , ctx )
318320 verse = await fetch_random_verse ()
319- ctx .reply (verse )
321+ await ctx .reply (verse )
320322
321323
322324@TBotD .command ()
@@ -377,7 +379,7 @@ async def fetch_random_verse() -> str:
377379 book = data .get ("book" , "Unknown Book" )
378380 chapter = data .get ("chapter" , 0 )
379381 verse = data .get ("verse" , 0 )
380- text = data .get ("text" , "The industrial revolution and its consequences have been a disaster for the human race." )
382+ text = data .get ("text" , "The industrial revolution and its consequences have been a disaster for the human race." ). strip ()
381383 answer = f"({ book } { chapter } :{ verse } ) \" { text } \" "
382384 except httpx .HTTPError as exc :
383385 bl .error_log (exc )
0 commit comments