diff --git a/src/NadekoBot/Services/GreetSettingsService.cs b/src/NadekoBot/Services/GreetSettingsService.cs index 167479a57..21c1b5f69 100644 --- a/src/NadekoBot/Services/GreetSettingsService.cs +++ b/src/NadekoBot/Services/GreetSettingsService.cs @@ -54,7 +54,12 @@ namespace NadekoBot.Services private Task ClientOnGuildMemberUpdated(SocketGuildUser oldUser, SocketGuildUser newUser) { - if (oldUser is { PremiumSince: null } && newUser is { PremiumSince: not null }) + // if user is a new booster + // or boosted again the same server + if ((oldUser is { PremiumSince: null } && newUser is { PremiumSince: not null }) + || (oldUser.PremiumSince is DateTimeOffset oldDate + && newUser.PremiumSince is DateTimeOffset newDate + && newDate > oldDate)) { var conf = GetOrAddSettingsForGuild(newUser.Guild.Id); if (!conf.SendBoostMessage) return Task.CompletedTask; @@ -603,6 +608,7 @@ namespace NadekoBot.Services using var uow = _db.GetDbContext(); var conf = uow.GuildConfigsForId(guildId, set => set); conf.SendBoostMessage = !conf.SendBoostMessage; + conf.BoostMessageChannelId = channelId; await uow.SaveChangesAsync(); var toAdd = GreetSettings.Create(conf); diff --git a/src/NadekoBot/Services/Impl/StatsService.cs b/src/NadekoBot/Services/Impl/StatsService.cs index 1e77ade22..8e86bd2fd 100644 --- a/src/NadekoBot/Services/Impl/StatsService.cs +++ b/src/NadekoBot/Services/Impl/StatsService.cs @@ -19,7 +19,7 @@ namespace NadekoBot.Services private readonly IBotCredentials _creds; private readonly DateTime _started; - public const string BotVersion = "3.0.1"; + public const string BotVersion = "3.0.2"; public string Author => "Kwoth#2452"; public string Library => "Discord.Net";