You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
awaitctx.Channel.SendMessageAsync($"{Program.cfgjson.Emoji.Banned}{targetMember.Mention} has been banned: **{reason}**");
278
-
else
279
-
awaitctx.Channel.SendMessageAsync($"{Program.cfgjson.Emoji.Banned}{targetMember.Mention} has been banned for **{TimeHelpers.TimeToPrettyFormat(banDuration,false)}**: **{reason}**");
280
288
}
281
289
282
290
/// I CANNOT find a way to do this as alias so I made it a separate copy of the command.
@@ -357,11 +365,6 @@ public async Task BankeepCmd(TextCommandContext ctx,
awaitctx.Channel.SendMessageAsync($"{Program.cfgjson.Emoji.Banned}{targetMember.Mention} has been banned: **{reason}**");
363
-
else
364
-
awaitctx.Channel.SendMessageAsync($"{Program.cfgjson.Emoji.Banned}{targetMember.Mention} has been banned for **{TimeHelpers.TimeToPrettyFormat(banDuration,false)}**: **{reason}**");
output.chatMessage=awaitchannel.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} <@{targetUserId}> has been banned: **{reason}**");
28
+
else
29
+
output.chatMessage=awaitchannel.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} <@{targetUserId}> has been banned for **{TimeHelpers.TimeToPrettyFormat(banDuration,false)}**: **{reason}**");
30
+
}
32
31
33
32
try
34
33
{
@@ -38,24 +37,54 @@ public static async Task<bool> BanFromServerAsync(ulong targetUserId, string rea
38
37
if(appealable)
39
38
{
40
39
if(compromisedAccount)
41
-
awaittargetMember.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} You have been banned from **{guild.Name}**!\nReason: **{reason}**\nYou can appeal the ban here: <{Program.cfgjson.AppealLink}>\nBefore appealing, please follow these steps to protect your account:\n1. Reset your Discord account password. Even if you use MFA, this will reset all session tokens.\n2. Review active sessions and authorised app connections.\n3. Ensure your PC is free of malware.\n4. [Enable MFA](https://support.discord.com/hc/en-us/articles/219576828-Setting-up-Multi-Factor-Authentication) if not already.");
40
+
output.dmMessage=awaittargetMember.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} You have been banned from **{guild.Name}**!\nReason: **{reason}**\nYou can appeal the ban here: <{Program.cfgjson.AppealLink}>\nBefore appealing, please follow these steps to protect your account:\n1. Reset your Discord account password. Even if you use MFA, this will reset all session tokens.\n2. Review active sessions and authorised app connections.\n3. Ensure your PC is free of malware.\n4. [Enable MFA](https://support.discord.com/hc/en-us/articles/219576828-Setting-up-Multi-Factor-Authentication) if not already.");
42
41
else
43
-
awaittargetMember.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} You have been banned from **{guild.Name}**!\nReason: **{reason}**\nYou can appeal the ban here: <{Program.cfgjson.AppealLink}>");
42
+
output.dmMessage=awaittargetMember.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} You have been banned from **{guild.Name}**!\nReason: **{reason}**\nYou can appeal the ban here: <{Program.cfgjson.AppealLink}>");
44
43
}
45
44
else
46
45
{
47
-
awaittargetMember.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} You have been permanently banned from **{guild.Name}**!\nReason: **{reason}**");
46
+
output.dmMessage=awaittargetMember.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} You have been permanently banned from **{guild.Name}**!\nReason: **{reason}**");
48
47
}
49
48
}
50
49
else
51
50
{
52
-
awaittargetMember.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} You have been banned from **{guild.Name}** for {TimeHelpers.TimeToPrettyFormat(banDuration,false)}!\nReason: **{reason}**\nBan expires: <t:{TimeHelpers.ToUnixTimestamp(expireTime)}:R>");
51
+
output.dmMessage=awaittargetMember.SendMessageAsync($"{Program.cfgjson.Emoji.Banned} You have been banned from **{guild.Name}** for {TimeHelpers.TimeToPrettyFormat(banDuration,false)}!\nReason: **{reason}**\nBan expires: <t:{TimeHelpers.ToUnixTimestamp(expireTime)}:R>");
Program.discord.Logger.LogWarning("A warning in forum channel {channelId} was attempted, but may fail due to the fallback channel not being set. Please set 'forumChannelAutoWarnFallbackChannel' in config.json to avoid this.",targetChannel.Id);
Program.discord.Logger.LogDebug(Program.CliptokEventID,"Checked for auto-warn and compromised account ban messages at {time} with result: {result}",DateTime.Now,success);
0 commit comments