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

Add /clear command

Signed-off-by: Octol1ttle <l1ttleofficial@outlook.com>
This commit is contained in:
Octol1ttle 2023-07-01 16:45:50 +05:00
parent 2265364b52
commit 17c43be878
Signed by: Octol1ttle
GPG key ID: B77C34313AEE1FFF
11 changed files with 169 additions and 19 deletions

View file

@ -113,6 +113,7 @@ public class BanCommandGroup : CommandGroup {
string.Format(
Messages.DescriptionActionExpiresAt,
Markdown.Timestamp(DateTimeOffset.UtcNow.Add(duration.Value))));
var description = builder.ToString();
var dmChannelResult = await _userApi.CreateDMAsync(target.ID, CancellationToken);
if (dmChannelResult.IsDefined(out var dmChannel)) {
@ -122,7 +123,7 @@ public class BanCommandGroup : CommandGroup {
var dmEmbed = new EmbedBuilder().WithGuildTitle(guild)
.WithTitle(Messages.YouWereBanned)
.WithDescription(builder.ToString())
.WithDescription(description)
.WithActionFooter(user)
.WithCurrentTimestamp()
.WithColour(ColorsList.Red)
@ -150,7 +151,7 @@ public class BanCommandGroup : CommandGroup {
|| (cfg.PrivateFeedbackChannel is not 0 && cfg.PrivateFeedbackChannel != channelId.Value)) {
var logEmbed = new EmbedBuilder().WithSmallTitle(
string.Format(Messages.UserBanned, target.GetTag()), target)
.WithDescription(builder.ToString())
.WithDescription(description)
.WithActionFooter(user)
.WithCurrentTimestamp()
.WithColour(ColorsList.Red)