File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed
Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change 1010
1111
1212def check_cooldown_factory (
13- seconds : int = 10 ,
13+ seconds : float = 10 ,
1414) -> ty .Callable [[discord .Interaction ], discord .app_commands .Cooldown | None ]:
1515 """Global cooldown for commands."""
1616
Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ def __init__(
2323 self .model_name = os .getenv ("OPENAI_MODEL_NAME" , "" )
2424
2525 @discord .app_commands .command ()
26- @discord .app_commands .checks .dynamic_cooldown (check_cooldown_factory (3 ))
26+ @discord .app_commands .checks .dynamic_cooldown (check_cooldown_factory (1.5 ))
2727 @discord .app_commands .guild_only ()
2828 @discord .app_commands .describe (
2929 message = "Message to the AI." ,
@@ -57,5 +57,5 @@ async def chat(
5757 await ia .followup .send (message [:2000 ])
5858
5959 if len (message ) > 2000 :
60- for split in range (1 , math .ceil (len (message ) / 2000 ) + 1 ):
60+ for split in range (1 , math .ceil (len (message ) / 2000 )):
6161 await ia .followup .send (message [2000 * split : 2000 * (split + 1 )])
You can’t perform that action at this time.
0 commit comments