File tree 1 file changed +17
-10
lines changed
1 file changed +17
-10
lines changed Original file line number Diff line number Diff line change @@ -21,17 +21,24 @@ async function webhookMenu(
21
21
webhooks . addButtonInput ( "" , I18n . webhooks . newWebHook ( ) , ( ) => {
22
22
const nameBox = new Dialog ( I18n . webhooks . EnterWebhookName ( ) ) ;
23
23
const options = nameBox . float . options ;
24
+ const defualts = I18n . webhooks . sillyDefaults ( ) . split ( "\n" ) ;
24
25
let channel = channelId || moveChannels [ 0 ] . id ;
25
- options . addTextInput ( I18n . webhooks . name ( ) , async ( name ) => {
26
- const json = await (
27
- await fetch ( `${ guild . info . api } /channels/${ channel } /webhooks/` , {
28
- method : "POST" ,
29
- headers : guild . headers ,
30
- body : JSON . stringify ( { name} ) ,
31
- } )
32
- ) . json ( ) ;
33
- makeHook ( json ) ;
34
- } ) ;
26
+ options . addTextInput (
27
+ I18n . webhooks . name ( ) ,
28
+ async ( name ) => {
29
+ const json = await (
30
+ await fetch ( `${ guild . info . api } /channels/${ channel } /webhooks/` , {
31
+ method : "POST" ,
32
+ headers : guild . headers ,
33
+ body : JSON . stringify ( { name} ) ,
34
+ } )
35
+ ) . json ( ) ;
36
+ makeHook ( json ) ;
37
+ } ,
38
+ {
39
+ initText : defualts [ Math . floor ( Math . random ( ) * defualts . length ) ] ,
40
+ } ,
41
+ ) ;
35
42
if ( ! channelId ) {
36
43
const select = options . addSelect (
37
44
I18n . webhooks . channel ( ) ,
You can’t perform that action at this time.
0 commit comments