mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-14 05:45:02 +00:00
Migrate Logs to new Plugin structure, also dont ignore it
This commit is contained in:
parent
140ba84544
commit
aea019181c
16 changed files with 764 additions and 1 deletions
backend/src/plugins/Logs/events
23
backend/src/plugins/Logs/events/LogsChannelModifyEvts.ts
Normal file
23
backend/src/plugins/Logs/events/LogsChannelModifyEvts.ts
Normal file
|
@ -0,0 +1,23 @@
|
|||
import { logsEvent } from "../types";
|
||||
import { stripObjectToScalars } from "src/utils";
|
||||
import { LogType } from "src/data/LogType";
|
||||
|
||||
export const LogsChannelCreateEvt = logsEvent({
|
||||
event: "channelCreate",
|
||||
|
||||
async listener(meta) {
|
||||
meta.pluginData.state.guildLogs.log(LogType.CHANNEL_CREATE, {
|
||||
channel: stripObjectToScalars(meta.args.channel),
|
||||
});
|
||||
},
|
||||
});
|
||||
|
||||
export const LogsChannelDeleteEvt = logsEvent({
|
||||
event: "channelDelete",
|
||||
|
||||
async listener(meta) {
|
||||
meta.pluginData.state.guildLogs.log(LogType.CHANNEL_DELETE, {
|
||||
channel: stripObjectToScalars(meta.args.channel),
|
||||
});
|
||||
},
|
||||
});
|
Loading…
Add table
Add a link
Reference in a new issue