2020-10-01 01:43:38 +03:00
|
|
|
import { logsEvt } from "../types";
|
|
|
|
import { stripObjectToScalars } from "../../../utils";
|
|
|
|
import { LogType } from "../../../data/LogType";
|
2020-07-27 01:53:14 +02:00
|
|
|
|
2020-10-01 01:43:38 +03:00
|
|
|
export const LogsRoleCreateEvt = logsEvt({
|
2020-07-27 01:53:14 +02:00
|
|
|
event: "guildRoleCreate",
|
|
|
|
|
|
|
|
async listener(meta) {
|
|
|
|
meta.pluginData.state.guildLogs.log(LogType.ROLE_CREATE, {
|
|
|
|
role: stripObjectToScalars(meta.args.role),
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|
|
|
|
|
2020-10-01 01:43:38 +03:00
|
|
|
export const LogsRoleDeleteEvt = logsEvt({
|
2020-07-27 01:53:14 +02:00
|
|
|
event: "guildRoleDelete",
|
|
|
|
|
|
|
|
async listener(meta) {
|
|
|
|
meta.pluginData.state.guildLogs.log(LogType.ROLE_DELETE, {
|
|
|
|
role: stripObjectToScalars(meta.args.role),
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|