mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-22 01:05:02 +00:00
Add missing logtypes, add change visualization
This commit is contained in:
parent
da783eecef
commit
bf0886406d
8 changed files with 80 additions and 10 deletions
|
@ -1,5 +1,5 @@
|
|||
import { LogType } from "../../../data/LogType";
|
||||
import { stripObjectToScalars } from "../../../utils";
|
||||
import { differenceToString, getScalarDifference, stripObjectToScalars } from "../../../utils";
|
||||
import { logsEvt } from "../types";
|
||||
|
||||
export const LogsChannelCreateEvt = logsEvt({
|
||||
|
@ -21,3 +21,18 @@ export const LogsChannelDeleteEvt = logsEvt({
|
|||
});
|
||||
},
|
||||
});
|
||||
|
||||
export const LogsChannelUpdateEvt = logsEvt({
|
||||
event: "channelUpdate",
|
||||
|
||||
async listener(meta) {
|
||||
const diff = getScalarDifference(meta.args.oldChannel, meta.args.newChannel);
|
||||
const differenceString = differenceToString(diff);
|
||||
|
||||
meta.pluginData.state.guildLogs.log(LogType.CHANNEL_UPDATE, {
|
||||
oldChannel: stripObjectToScalars(meta.args.oldChannel),
|
||||
newChannel: stripObjectToScalars(meta.args.newChannel),
|
||||
differenceString,
|
||||
});
|
||||
},
|
||||
});
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue