mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-18 15:45:03 +00:00
feat(Bans): added reason to api call
This commit is contained in:
parent
c19fd847e7
commit
234686b1cf
1 changed files with 4 additions and 4 deletions
|
@ -524,7 +524,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
this.ignoreEvent(IgnoredEventType.Ban, userId);
|
||||
try {
|
||||
const deleteMessageDays = Math.min(30, Math.max(0, banOptions.deleteMessageDays ?? 1));
|
||||
await this.guild.banMember(userId, deleteMessageDays);
|
||||
await this.guild.banMember(userId, deleteMessageDays, reason);
|
||||
} catch (e) {
|
||||
return {
|
||||
status: "failed",
|
||||
|
@ -1201,7 +1201,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
this.ignoreEvent(IgnoredEventType.Unban, memberToKick.id);
|
||||
|
||||
try {
|
||||
await this.guild.unbanMember(memberToKick.id);
|
||||
await this.guild.unbanMember(memberToKick.id, reason);
|
||||
} catch (e) {
|
||||
this.sendErrorMessage(msg.channel, "Failed to unban the user after banning them (-clean)");
|
||||
}
|
||||
|
@ -1375,7 +1375,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
|
||||
try {
|
||||
this.ignoreEvent(IgnoredEventType.Unban, user.id);
|
||||
await this.guild.unbanMember(user.id);
|
||||
await this.guild.unbanMember(user.id, reason);
|
||||
} catch (e) {
|
||||
this.sendErrorMessage(msg.channel, "Failed to unban member; are you sure they're banned?");
|
||||
return;
|
||||
|
@ -1448,7 +1448,7 @@ export class ModActionsPlugin extends ZeppelinPlugin<TConfigSchema> {
|
|||
this.serverLogs.ignoreLog(LogType.MEMBER_BAN, user.id);
|
||||
|
||||
try {
|
||||
await this.guild.banMember(user.id, 1);
|
||||
await this.guild.banMember(user.id, 1, reason);
|
||||
} catch (e) {
|
||||
this.sendErrorMessage(msg.channel, "Failed to forceban member");
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue