timed ban should now work with userids (users who are not in the server yet), closes #400

This commit is contained in:
Kwoth
2023-02-11 22:32:36 +01:00
parent 98956481e9
commit 313ca2674e
3 changed files with 21 additions and 11 deletions

View File

@@ -157,7 +157,7 @@ public class UserPunishService : INService, IReadyExecutor
if (minutes == 0)
await guild.AddBanAsync(user, reason: reason, pruneDays: banPrune);
else
await _mute.TimedBan(user.Guild, user, TimeSpan.FromMinutes(minutes), reason, banPrune);
await _mute.TimedBan(user.Guild, user.Id, TimeSpan.FromMinutes(minutes), reason, banPrune);
break;
case PunishmentAction.Softban:
banPrune = await GetBanPruneAsync(user.GuildId) ?? 7;