mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-04 00:34:26 -05:00 
			
		
		
		
	fix: .langset and .langsetd should no longer allow unsupported languages and nonsense to be typed in
This commit is contained in:
		@@ -61,7 +61,13 @@ public partial class Administration
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    ci = new(name);
 | 
			
		||||
                    ci = new CultureInfo(name);
 | 
			
		||||
                    if (!_supportedLocales.ContainsKey(ci.Name))
 | 
			
		||||
                    {
 | 
			
		||||
                        await LanguagesList();
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
                    
 | 
			
		||||
                    _localization.SetGuildCulture(ctx.Guild, ci);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
@@ -97,7 +103,12 @@ public partial class Administration
 | 
			
		||||
                }
 | 
			
		||||
                else
 | 
			
		||||
                {
 | 
			
		||||
                    ci = new(name);
 | 
			
		||||
                    ci = new CultureInfo(name);
 | 
			
		||||
                    if (!_supportedLocales.ContainsKey(ci.Name))
 | 
			
		||||
                    {
 | 
			
		||||
                        await LanguagesList();
 | 
			
		||||
                        return;
 | 
			
		||||
                    }
 | 
			
		||||
                    _localization.SetDefaultCulture(ci);
 | 
			
		||||
                }
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user