@@ -61,7 +61,7 @@ string GetCurrentConfiguration(SharedCommandContext ctx)
6161 var ToggleGlobalban = new DiscordButtonComponent ( ( ctx . DbGuild . Join . AutoBanGlobalBans ? ButtonStyle . Danger : ButtonStyle . Success ) , Guid . NewGuid ( ) . ToString ( ) , this . GetString ( CommandKey . ToggleGlobalBansButton ) , false , new DiscordComponentEmoji ( DiscordEmoji . FromUnicode ( "🌐" ) ) ) ;
6262 var ChangeJoinlogChannel = new DiscordButtonComponent ( ButtonStyle . Primary , Guid . NewGuid ( ) . ToString ( ) , this . GetString ( CommandKey . ChangeJoinlogChannelButton ) , false , new DiscordComponentEmoji ( DiscordEmoji . FromUnicode ( "👋" ) ) ) ;
6363 var ChangeUserCountChannel = new DiscordButtonComponent ( ButtonStyle . Primary , Guid . NewGuid ( ) . ToString ( ) , this . GetString ( CommandKey . ChangeUserCountChannel ) , false , new DiscordComponentEmoji ( DiscordEmoji . FromUnicode ( "🔢" ) ) ) ;
64- var ChangeUserCountFormat = new DiscordButtonComponent ( ButtonStyle . Primary , Guid . NewGuid ( ) . ToString ( ) , this . GetString ( CommandKey . ChangeUserCountChannelFormat ) , false , new DiscordComponentEmoji ( DiscordEmoji . FromUnicode ( "🔢" ) ) ) ;
64+ var ChangeUserCountFormat = new DiscordButtonComponent ( ButtonStyle . Primary , Guid . NewGuid ( ) . ToString ( ) , this . GetString ( CommandKey . ChangeUserCountChannelFormat ) , ctx . DbGuild . Join . UserCountChannelId == 0 , new DiscordComponentEmoji ( DiscordEmoji . FromUnicode ( "🔢" ) ) ) ;
6565 var ChangeRoleOnJoin = new DiscordButtonComponent ( ButtonStyle . Primary , Guid . NewGuid ( ) . ToString ( ) , this . GetString ( CommandKey . ChangeRoleButton ) , false , new DiscordComponentEmoji ( DiscordEmoji . FromUnicode ( "👤" ) ) ) ;
6666 var ToggleReApplyRoles = new DiscordButtonComponent ( ( ctx . DbGuild . Join . ReApplyRoles ? ButtonStyle . Danger : ButtonStyle . Success ) , Guid . NewGuid ( ) . ToString ( ) , this . GetString ( CommandKey . ToggleReApplyRole ) , false , new DiscordComponentEmoji ( DiscordEmoji . FromUnicode ( "👥" ) ) ) ;
6767 var ToggleReApplyName = new DiscordButtonComponent ( ( ctx . DbGuild . Join . ReApplyNickname ? ButtonStyle . Danger : ButtonStyle . Success ) , Guid . NewGuid ( ) . ToString ( ) , this . GetString ( CommandKey . ToggleReApplyNickname ) , false , new DiscordComponentEmoji ( DiscordEmoji . FromUnicode ( "💬" ) ) ) ;
@@ -201,6 +201,9 @@ string GetCurrentConfiguration(SharedCommandContext ctx)
201201
202202 ctx . DbGuild . Join . UserCountChannelId = ChannelResult . Result is null ? 0 : ChannelResult . Result . Id ;
203203
204+ if ( ChannelResult . Result is not null )
205+ await JoinEvents . RunUserCountUpdater ( ctx . Bot , ctx . Guild ) ;
206+
204207 await this . ExecuteCommand ( ctx , arguments ) ;
205208 return ;
206209 }
@@ -236,6 +239,9 @@ string GetCurrentConfiguration(SharedCommandContext ctx)
236239
237240 ctx . DbGuild . Join . UserCountChannelFormat = modelResult . Result . Interaction . GetModalValueByCustomId ( "new_format" ) ;
238241
242+ if ( ctx . DbGuild . Join . UserCountChannelId != 0 )
243+ await JoinEvents . RunUserCountUpdater ( ctx . Bot , ctx . Guild ) ;
244+
239245 await this . ExecuteCommand ( ctx , arguments ) ;
240246 return ;
241247 }
0 commit comments