mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-19 07:20:00 +00:00
35 lines
905 B
TypeScript
35 lines
905 B
TypeScript
![]() |
import { LogType } from "../../../data/LogType";
|
||
|
import { stripObjectToScalars } from "../../../utils";
|
||
|
import { logsEvt } from "../types";
|
||
|
|
||
|
export const LogsThreadCreateEvt = logsEvt({
|
||
|
event: "threadCreate",
|
||
|
|
||
|
async listener(meta) {
|
||
|
meta.pluginData.state.guildLogs.log(LogType.THREAD_CREATE, {
|
||
|
thread: stripObjectToScalars(meta.args.thread),
|
||
|
});
|
||
|
},
|
||
|
});
|
||
|
|
||
|
export const LogsThreadDeleteEvt = logsEvt({
|
||
|
event: "threadDelete",
|
||
|
|
||
|
async listener(meta) {
|
||
|
meta.pluginData.state.guildLogs.log(LogType.THREAD_DELETE, {
|
||
|
thread: stripObjectToScalars(meta.args.thread),
|
||
|
});
|
||
|
},
|
||
|
});
|
||
|
|
||
|
export const LogsThreadUpdateEvt = logsEvt({
|
||
|
event: "threadUpdate",
|
||
|
|
||
|
async listener(meta) {
|
||
|
meta.pluginData.state.guildLogs.log(LogType.THREAD_UPDATE, {
|
||
|
oldThread: stripObjectToScalars(meta.args.oldThread),
|
||
|
newThread: stripObjectToScalars(meta.args.newThread),
|
||
|
});
|
||
|
},
|
||
|
});
|