mirror of
				https://gitlab.com/Kwoth/nadekobot.git
				synced 2025-11-03 16:24:27 -05:00 
			
		
		
		
	- Added NadekoBot.Generators projects which will contain source generators
- Implemented initial version of the response strings source generator - Creates a class with property names equivalent to key names in responses.en-US.json - Each Property has struct type (with generic type parameters matching the number of string format placeholders) for type safe GetText implementation - Struct types are readonly refs as they should be ephermal, and only used to pass string keys to GetText
This commit is contained in:
		@@ -51,7 +51,7 @@ namespace NadekoBot.Modules.Games
 | 
			
		||||
            await ctx.Channel.EmbedAsync(_eb.Create().WithOkColor()
 | 
			
		||||
                .WithDescription(ctx.User.ToString())
 | 
			
		||||
                .AddField("❓ " + GetText("question"), question, false)
 | 
			
		||||
                .AddField("🎱 " + GetText("8ball"), res, false));
 | 
			
		||||
                .AddField("🎱 " + GetText("_8ball"), res, false));
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        [NadekoCommand, Aliases]
 | 
			
		||||
 
 | 
			
		||||
@@ -532,7 +532,7 @@ namespace NadekoBot.Modules.Searches
 | 
			
		||||
                        var embed = _eb.Create()
 | 
			
		||||
                            .WithDescription(ctx.User.Mention)
 | 
			
		||||
                            .AddField(GetText("word"), data.Word, true)
 | 
			
		||||
                            .AddField(GetText("class"), data.WordType, true)
 | 
			
		||||
                            .AddField(GetText("_class"), data.WordType, true)
 | 
			
		||||
                            .AddField(GetText("definition"), data.Definition)
 | 
			
		||||
                            .WithOkColor();
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
@@ -190,13 +190,13 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                string description = "";
 | 
			
		||||
                if (_service.IsNoRedundant(runner.Repeater.Id))
 | 
			
		||||
                {
 | 
			
		||||
                    description = Format.Underline(Format.Bold(GetText("no_redundant:"))) + "\n\n";
 | 
			
		||||
                    description = Format.Underline(Format.Bold(GetText("no_redundant"))) + "\n\n";
 | 
			
		||||
                }
 | 
			
		||||
                
 | 
			
		||||
                description += $"<#{runner.Repeater.ChannelId}>\n" +
 | 
			
		||||
                                  $"`{GetText("interval:")}` {intervalString}\n" +
 | 
			
		||||
                                  $"`{GetText("executes_in:")}` {executesInString}\n" +
 | 
			
		||||
                                  $"`{GetText("message:")}` {message}";
 | 
			
		||||
                                  $"`{GetText("Comment")}` {intervalString}\n" +
 | 
			
		||||
                                  $"`{GetText("executes_in_colon")}` {executesInString}\n" +
 | 
			
		||||
                                  $"`{GetText("message_colon")}` {message}";
 | 
			
		||||
            
 | 
			
		||||
                return description;
 | 
			
		||||
            }
 | 
			
		||||
 
 | 
			
		||||
@@ -249,7 +249,7 @@ namespace NadekoBot.Modules.Utility
 | 
			
		||||
                        .WithAuthor($"NadekoBot v{StatsService.BotVersion}",
 | 
			
		||||
                            "https://nadeko-pictures.nyc3.digitaloceanspaces.com/other/avatar.png",
 | 
			
		||||
                            "https://nadekobot.readthedocs.io/en/latest/")
 | 
			
		||||
                        .AddField(GetText("author"), _stats.Author, true)
 | 
			
		||||
                        .AddField(GetText(Strs.author), _stats.Author, true)
 | 
			
		||||
                        .AddField(GetText("botid"), _client.CurrentUser.Id.ToString(), true)
 | 
			
		||||
                        .AddField(GetText("shard"), $"#{_client.ShardId} / {_creds.TotalShards}", true)
 | 
			
		||||
                        .AddField(GetText("commands_ran"), _stats.CommandsRan.ToString(), true)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user