mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Update to Knub30.0.0-beta.37 and Eris 0.15, first pass
This commit is contained in:
parent
84da543205
commit
f6be4f4af6
133 changed files with 6507 additions and 380 deletions
|
@ -13,9 +13,9 @@ import { Case } from "../../../data/entities/Case";
|
|||
* Create a BAN case automatically when a user is banned manually.
|
||||
* Attempts to find the ban's details in the audit log.
|
||||
*/
|
||||
export const CreateBanCaseOnManualBanEvt = modActionsEvt(
|
||||
"guildBanAdd",
|
||||
async ({ pluginData, args: { guild, user } }) => {
|
||||
export const CreateBanCaseOnManualBanEvt = modActionsEvt({
|
||||
event: "guildBanAdd",
|
||||
async listener({ pluginData, args: { guild, user } }) {
|
||||
if (isEventIgnored(pluginData, IgnoredEventType.Ban, user.id)) {
|
||||
clearIgnoredEvents(pluginData, IgnoredEventType.Ban, user.id);
|
||||
return;
|
||||
|
@ -39,7 +39,7 @@ export const CreateBanCaseOnManualBanEvt = modActionsEvt(
|
|||
|
||||
mod = await resolveUser(pluginData.client, modId);
|
||||
|
||||
const config = mod instanceof UnknownUser ? pluginData.config.get() : pluginData.config.getForUser(mod);
|
||||
const config = mod instanceof UnknownUser ? pluginData.config.get() : await pluginData.config.getForUser(mod);
|
||||
|
||||
if (config.create_cases_for_manual_actions) {
|
||||
reason = relevantAuditLogEntry.reason || "";
|
||||
|
@ -72,4 +72,4 @@ export const CreateBanCaseOnManualBanEvt = modActionsEvt(
|
|||
|
||||
pluginData.state.events.emit("ban", user.id, reason);
|
||||
},
|
||||
);
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue