1
0
Fork 1
mirror of https://github.com/TeamOctolings/Octobot.git synced 2025-05-02 20:19:55 +03:00

Begin adapting code to new guild data storage

This commit is contained in:
Octol1ttle 2022-12-30 00:47:02 +05:00
parent f5a81fba35
commit 163e3ac46b
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
8 changed files with 56 additions and 167 deletions

View file

@ -1,3 +1,4 @@
using Boyfriend.Data;
using Discord;
using Discord.WebSocket;
@ -32,7 +33,7 @@ public sealed class BanCommand : ICommand {
cmd.Reply(feedback, ReplyEmojis.Banned);
cmd.Audit(feedback);
if (duration.TotalSeconds > 0)
await Task.FromResult(Utils.DelayedUnbanAsync(cmd, toBan.Id, Messages.PunishmentExpired, duration));
GuildData.FromSocketGuild(guild).MemberData[toBan.Id].BannedUntil
= DateTimeOffset.Now.Add(duration).ToUnixTimeSeconds();
}
}