diff --git a/Boyfriend.cs b/Boyfriend.cs index ffb3fbc..4301e20 100644 --- a/Boyfriend.cs +++ b/Boyfriend.cs @@ -150,7 +150,7 @@ public static class Boyfriend { var user = guild.GetUser(mData.Id); if (DateTimeOffset.Now >= mData.BannedUntil) _ = guild.RemoveBanAsync(mData.Id); if (!mData.IsInGuild) continue; - if (!mData.Roles.Contains(starterRoleId)) _ = user.AddRoleAsync(starterRoleId); + if (!mData.Roles.Contains(starterRoleId) && mData.MutedUntil is null) _ = user.AddRoleAsync(starterRoleId); if (DateTimeOffset.Now >= mData.MutedUntil) { await Utils.UnmuteMemberAsync( diff --git a/EventHandler.cs b/EventHandler.cs index 23c6510..ba4ba79 100644 --- a/EventHandler.cs +++ b/EventHandler.cs @@ -88,7 +88,7 @@ public static class EventHandler { "op ??" => message.ReplyAsync( "некоторые пасхальные цитаты которые вы могли найти были легально взяты у <@573772175572729876>"), "++++" => message.ReplyAsync("#"), - _ => new CommandProcessor(message).HandleCommandAsync() + _ => new CommandProcessor(message).HandleCommandAsync() }; return Task.CompletedTask; } @@ -129,8 +129,6 @@ public static class EventHandler { ? Messages.DefaultWelcomeMessage : config["WelcomeMessage"], user.Mention, guild.Name)); - if (config["StarterRole"] is not "0") await user.AddRoleAsync(ulong.Parse(config["StarterRole"])); - if (!data.MemberData.ContainsKey(user.Id)) data.MemberData.Add(user.Id, new MemberData(user)); var memberData = data.MemberData[user.Id]; memberData.IsInGuild = true;