Added Timeout as a punishment to warnpunish and anti* commands

This commit is contained in:
Kwoth
2022-08-11 16:19:02 +02:00
parent b853495d65
commit dc229ea2b3
4 changed files with 29 additions and 3 deletions

View File

@@ -345,6 +345,10 @@ public partial class Administration
if (punish is PunishmentAction.AddRole or PunishmentAction.Warn)
return;
// you must specify the time for timeout
if (punish is PunishmentAction.TimeOut && time is null)
return;
var success = _service.WarnPunish(ctx.Guild.Id, number, punish, time);
if (!success)