3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-21 16:55:03 +00:00

More Automod updates

This commit is contained in:
Dragory 2020-07-28 21:51:58 +03:00
parent d4078b4234
commit 62c68b99f7
13 changed files with 88 additions and 28 deletions

View file

@ -17,6 +17,8 @@ import { LogsChannelCreateEvt, LogsChannelDeleteEvt } from "./events/LogsChannel
import { LogsRoleCreateEvt, LogsRoleDeleteEvt } from "./events/LogsRoleModifyEvts";
import { LogsVoiceJoinEvt, LogsVoiceLeaveEvt, LogsVoiceSwitchEvt } from "./events/LogsVoiceChannelEvts";
import { log } from "./util/log";
import { LogType } from "../../data/LogType";
import { getLogMessage } from "./util/getLogMessage";
const defaultOptions: PluginOptions<LogsPluginType> = {
config: {
@ -58,6 +60,20 @@ export const LogsPlugin = zeppelinPlugin<LogsPluginType>()("logs", {
LogsVoiceSwitchEvt,
],
public: {
log(pluginData) {
return (type: LogType, data: any) => {
return log(pluginData, type, data);
};
},
getLogMessage(pluginData) {
return (type: LogType, data: any) => {
return getLogMessage(pluginData, type, data);
};
},
},
onLoad(pluginData) {
const { state, guild } = pluginData;