diff --git a/src/NadekoBot/Modules/Gambling/GamblingTopLevelModule.cs b/src/NadekoBot/Modules/Gambling/GamblingTopLevelModule.cs index bb3ce8b64..e872baa70 100644 --- a/src/NadekoBot/Modules/Gambling/GamblingTopLevelModule.cs +++ b/src/NadekoBot/Modules/Gambling/GamblingTopLevelModule.cs @@ -39,13 +39,18 @@ public abstract class GamblingModule : NadekoModule return true; } - protected string N(T cur) - where T : INumber + protected string N(long cur) + => cur.ToString("C0", GetFlowersCiInternal()); + + protected string N(decimal cur) + => cur.ToString("C0", GetFlowersCiInternal()); + + private IFormatProvider GetFlowersCiInternal() { var flowersCi = (CultureInfo)Culture.Clone(); flowersCi.NumberFormat.CurrencySymbol = CurrencySign; flowersCi.NumberFormat.CurrencyNegativePattern = 5; - return cur.ToString("C0", flowersCi); + return flowersCi; } protected Task CheckBetMandatory(long amount) diff --git a/src/NadekoBot/Modules/Searches/Feeds/FeedsService.cs b/src/NadekoBot/Modules/Searches/Feeds/FeedsService.cs index 5ca22e2b2..fe3e2090e 100644 --- a/src/NadekoBot/Modules/Searches/Feeds/FeedsService.cs +++ b/src/NadekoBot/Modules/Searches/Feeds/FeedsService.cs @@ -155,7 +155,7 @@ public class FeedsService : INService public List GetFeeds(ulong guildId) { using var uow = _db.GetDbContext(); - return uow.GuildConfigsForId(guildId, set => set.Include(x => x.FeedSubs).ThenInclude(x => x.GuildConfig)) + return uow.GuildConfigsForId(guildId, set => set.Include(x => x.FeedSubs)) .FeedSubs.OrderBy(x => x.Id) .ToList(); } @@ -171,7 +171,7 @@ public class FeedsService : INService }; using var uow = _db.GetDbContext(); - var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.FeedSubs).ThenInclude(x => x.GuildConfig)); + var gc = uow.GuildConfigsForId(guildId, set => set.Include(x => x.FeedSubs)); if (gc.FeedSubs.Any(x => x.Url.ToLower() == fs.Url.ToLower())) return false; diff --git a/src/NadekoBot/NadekoBot.csproj b/src/NadekoBot/NadekoBot.csproj index 7c43cdbac..fe9ba7c42 100644 --- a/src/NadekoBot/NadekoBot.csproj +++ b/src/NadekoBot/NadekoBot.csproj @@ -29,14 +29,14 @@ - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -52,21 +52,21 @@ - + - - + + all runtime; build; native; contentfiles; analyzers; buildtransitive - + @@ -124,11 +124,4 @@ portable false - - - - - - - diff --git a/src/NadekoBot/data/strings/commands/commands.en-US.yml b/src/NadekoBot/data/strings/commands/commands.en-US.yml index e0dc5b19c..10f7bce74 100644 --- a/src/NadekoBot/data/strings/commands/commands.en-US.yml +++ b/src/NadekoBot/data/strings/commands/commands.en-US.yml @@ -1942,8 +1942,8 @@ ytuploadnotif: feed: desc: "Subscribes to a feed. Bot will post an update up to once every 10 seconds. You can have up to 10 feeds on one server. All feeds must have unique URLs. Set a channel as a second optional parameter to specify where to send the updates." args: - - "https://www.rt.com/rss/" - - "https://www.rt.com/rss/ #updates" + - "https://blog.playstation.com/feed/" + - "https://blog.playstation.com/feed/ #updates" feedremove: desc: "Stops tracking a feed on the given index. Use `{0}feeds` command to see a list of feeds and their indexes." args: