mirror of
https://github.com/TeamOctolings/Octobot.git
synced 2025-05-04 04:56:30 +03:00
Do not allow setting reminders without specifying a valid TimeSpan
Fixes #19 Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
parent
8f9c71edf1
commit
a97341f9a9
7 changed files with 39 additions and 15 deletions
|
@ -150,12 +150,13 @@ public static class Boyfriend {
|
|||
mentions.Clear();
|
||||
}
|
||||
|
||||
_ = ulong.TryParse(config["StarterRole"], out var starterRoleId);
|
||||
foreach (var mData in data.MemberData.Values) {
|
||||
var user = guild.GetUser(mData.Id);
|
||||
if (now >= mData.BannedUntil) _ = guild.RemoveBanAsync(mData.Id);
|
||||
if (!mData.IsInGuild) continue;
|
||||
if (!mData.Roles.Contains(starterRoleId) && mData.MutedUntil is null) _ = user.AddRoleAsync(starterRoleId);
|
||||
if (mData.MutedUntil is null
|
||||
&& ulong.TryParse(config["StarterRole"], out var starterRoleId)
|
||||
&& !mData.Roles.Contains(starterRoleId)) _ = user.AddRoleAsync(starterRoleId);
|
||||
|
||||
if (now >= mData.MutedUntil) {
|
||||
await Utils.UnmuteMemberAsync(
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue