mirror of
https://gitlab.com/Kwoth/nadekobot.git
synced 2025-09-11 09:48:26 -04:00
Refactors. Cleanup. Refactored responses source gen a little. Parametrized localized strings are now generic. Refactored .cash bank interaction. Updated changelog. Reverted clubapps/ban/unban to use .ToString method and configured it to not have right to left unicode. Added extension methods to SocketMessageComponent akin to ones on the IMessageChannel (RespondConfirm, etc...)
This commit is contained in:
17
src/NadekoBot/Services/strings/IBotStringsExtensions.cs
Normal file
17
src/NadekoBot/Services/strings/IBotStringsExtensions.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
#nullable disable
|
||||
using System.Globalization;
|
||||
|
||||
namespace NadekoBot.Services;
|
||||
|
||||
public static class BotStringsExtensions
|
||||
{
|
||||
// this one is for pipe fun, see PipeExtensions.cs
|
||||
public static string GetText(this IBotStrings strings, in LocStr str, in ulong guildId)
|
||||
=> strings.GetText(str.Key, guildId, str.Params);
|
||||
|
||||
public static string GetText(this IBotStrings strings, in LocStr str, ulong? guildId = null)
|
||||
=> strings.GetText(str.Key, guildId, str.Params);
|
||||
|
||||
public static string GetText(this IBotStrings strings, in LocStr str, CultureInfo culture)
|
||||
=> strings.GetText(str.Key, culture, str.Params);
|
||||
}
|
Reference in New Issue
Block a user