Disable actual ban/kick when DEBUG is set
This commit is contained in:
parent
4ef860790c
commit
1e681478f5
1 changed files with 7 additions and 0 deletions
|
@ -131,6 +131,9 @@ namespace Noikoio.RegexBot.Module.ModTools.Commands
|
|||
}
|
||||
else notifyfail = true;
|
||||
|
||||
// Give target user ability to petition
|
||||
Mt.AddPetition(g.Id, targetuid);
|
||||
|
||||
// Do the action
|
||||
try
|
||||
{
|
||||
|
@ -138,8 +141,12 @@ namespace Noikoio.RegexBot.Module.ModTools.Commands
|
|||
if (reason != null) reasonlog += $" Reason: {reason}";
|
||||
reasonlog = Uri.EscapeDataString(reasonlog);
|
||||
#warning Remove EscapeDataString call on next Discord.Net update
|
||||
#if !DEBUG
|
||||
if (_mode == CommandMode.Ban) await g.AddBanAsync(targetuid, _purgeDays, reasonlog);
|
||||
else await targetobj.KickAsync(reason);
|
||||
#else
|
||||
#warning "Actual kick/ban action is DISABLED during debug."
|
||||
#endif
|
||||
string resultmsg = BuildSuccessMessage(targetdisp);
|
||||
if (notifyfail)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue