File tree Expand file tree Collapse file tree 3 files changed +19
-2
lines changed
Expand file tree Collapse file tree 3 files changed +19
-2
lines changed Original file line number Diff line number Diff line change 1+ ---
2+ " @iqai/mcp-discord " : patch
3+ ---
4+
5+ Adds timeout setting in env for sampling messages
Original file line number Diff line number Diff line change @@ -32,6 +32,14 @@ const envSchema = z.object({
3232 . optional ( )
3333 . default ( true )
3434 . describe ( 'Only respond to messages that mention the bot' ) ,
35+ SAMPLING_DEFAULT_TIMEOUT : z
36+ . number ( )
37+ . optional ( )
38+ . describe ( 'A timeout (in milliseconds) for this request' ) ,
39+ SAMPLING_REACTION_TIMEOUT : z
40+ . number ( )
41+ . optional ( )
42+ . describe ( 'A timeout for sending reactions to discord' ) ,
3543 BLOCK_DMS : z
3644 . stringbool ( )
3745 . optional ( )
Original file line number Diff line number Diff line change @@ -187,7 +187,10 @@ export class SamplingHandler {
187187 maxTokens : 10 ,
188188 } ,
189189 } ,
190- z . any ( )
190+ z . any ( ) ,
191+ {
192+ timeout : env . SAMPLING_REACTION_TIMEOUT ,
193+ }
191194 ) ;
192195
193196 const response =
@@ -225,7 +228,8 @@ export class SamplingHandler {
225228 maxTokens : 200 ,
226229 } ,
227230 } ,
228- z . any ( )
231+ z . any ( ) ,
232+ { timeout : env . SAMPLING_DEFAULT_TIMEOUT }
229233 ) ;
230234 }
231235
You can’t perform that action at this time.
0 commit comments