mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-13 21:35:02 +00:00
Merge branch 'knub30' of git://github.com/almeidx/ZeppelinBot into almeidx-knub30
This commit is contained in:
commit
2077022299
5 changed files with 6 additions and 7 deletions
backend/src/plugins/ModActions/commands
|
@ -64,7 +64,7 @@ export const ForcebanCmd = modActionsCommand({
|
|||
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_BAN, user.id);
|
||||
|
||||
try {
|
||||
await pluginData.guild.banMember(user.id, 1);
|
||||
await pluginData.guild.banMember(user.id, 1, encodeURIComponent(reason));
|
||||
} catch (e) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Failed to forceban member");
|
||||
return;
|
||||
|
|
|
@ -66,7 +66,7 @@ export const MassbanCmd = modActionsCommand({
|
|||
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
||||
for (const userId of args.userIds) {
|
||||
try {
|
||||
await pluginData.guild.banMember(userId, 1);
|
||||
await pluginData.guild.banMember(userId, 1, encodeURIComponent(banReason));
|
||||
|
||||
await casesPlugin.createCase({
|
||||
userId,
|
||||
|
|
|
@ -42,17 +42,16 @@ export const UnbanCmd = modActionsCommand({
|
|||
}
|
||||
|
||||
pluginData.state.serverLogs.ignoreLog(LogType.MEMBER_UNBAN, user.id);
|
||||
const reason = formatReasonWithAttachments(args.reason, msg.attachments);
|
||||
|
||||
try {
|
||||
ignoreEvent(pluginData, IgnoredEventType.Unban, user.id);
|
||||
await pluginData.guild.unbanMember(user.id);
|
||||
await pluginData.guild.unbanMember(user.id, encodeURIComponent(reason));
|
||||
} catch (e) {
|
||||
sendErrorMessage(pluginData, msg.channel, "Failed to unban member; are you sure they're banned?");
|
||||
return;
|
||||
}
|
||||
|
||||
const reason = formatReasonWithAttachments(args.reason, msg.attachments);
|
||||
|
||||
// Create a case
|
||||
const casesPlugin = pluginData.getPlugin(CasesPlugin);
|
||||
const createdCase = await casesPlugin.createCase({
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue