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:
parent
f5a81fba35
commit
163e3ac46b
8 changed files with 56 additions and 167 deletions
|
@ -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();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue