@@ -116,6 +116,32 @@ public static async Task Init()
116116 return ;
117117 }
118118
119+ int channels_to_create = CHANNELS_TO_CREATE ;
120+
121+ Console . Write ( $ "[?] How many channels would you like to create? Press Enter to use the default ({ channels_to_create } ): ") ;
122+ string ? channelsInput = Console . ReadLine ( ) ;
123+
124+ if ( ! string . IsNullOrEmpty ( channelsInput ) )
125+ {
126+ if ( ! int . TryParse ( channelsInput , out channels_to_create ) )
127+ {
128+ channels_to_create = CHANNELS_TO_CREATE ;
129+ }
130+ }
131+
132+ int messages_per_webhook = MESSAGES_PER_WEBHOOK ;
133+ Console . Write ( $ "[?] How many messages should each webhook send? Press Enter to keep the default ({ messages_per_webhook } ): ") ;
134+ string ? webhookInput = Console . ReadLine ( ) ;
135+
136+ if ( ! string . IsNullOrEmpty ( webhookInput ) )
137+ {
138+ if ( ! int . TryParse ( webhookInput , out messages_per_webhook ) )
139+ {
140+ messages_per_webhook = MESSAGES_PER_WEBHOOK ;
141+ }
142+ }
143+
144+
119145 List < DiscordChannel > ? channels = await Discord . GetChannels ( token , guildId ) ;
120146
121147 if ( channels != null && channels . Count >= 1 )
@@ -142,7 +168,7 @@ public static async Task Init()
142168 List < DiscordChannel > createdChannels = [ ] ;
143169 List < Task > creationTasks = [ ] ;
144170
145- for ( int i = 0 ; i < CHANNELS_TO_CREATE ; i ++ )
171+ for ( int i = 0 ; i < channels_to_create ; i ++ )
146172 {
147173 var task = Task . Run ( async ( ) =>
148174 {
@@ -190,7 +216,7 @@ public static async Task Init()
190216 {
191217 _ = Task . Run ( async ( ) =>
192218 {
193- for ( int i = 0 ; i < MESSAGES_PER_WEBHOOK ; i ++ )
219+ for ( int i = 0 ; i < messages_per_webhook ; i ++ )
194220 {
195221 await Discord . SendMessageToWebhook ( webhook . url , content ) ;
196222 }
0 commit comments