mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-10 12:25:02 +00:00
Typed log functions + more
This commit is contained in:
parent
d2ac700143
commit
bed6589d48
166 changed files with 4021 additions and 869 deletions
|
@ -1,15 +1,16 @@
|
|||
import { Snowflake, VoiceChannel } from "discord.js";
|
||||
import {
|
||||
channelToConfigAccessibleChannel,
|
||||
memberToConfigAccessibleMember,
|
||||
userToConfigAccessibleUser,
|
||||
} from "../../../utils/configAccessibleObjects";
|
||||
channelToTemplateSafeChannel,
|
||||
memberToTemplateSafeMember,
|
||||
userToTemplateSafeUser,
|
||||
} from "../../../utils/templateSafeObjects";
|
||||
import { commandTypeHelpers as ct } from "../../../commandTypes";
|
||||
import { LogType } from "../../../data/LogType";
|
||||
import { canActOn, sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
|
||||
import { channelMentionRegex, isSnowflake, simpleClosestStringMatch } from "../../../utils";
|
||||
import { utilityCmd } from "../types";
|
||||
import { ChannelTypeStrings } from "../../../types";
|
||||
import { LogsPlugin } from "../../Logs/LogsPlugin";
|
||||
|
||||
export const VcmoveCmd = utilityCmd({
|
||||
trigger: "vcmove",
|
||||
|
@ -79,11 +80,11 @@ export const VcmoveCmd = utilityCmd({
|
|||
return;
|
||||
}
|
||||
|
||||
pluginData.state.logs.log(LogType.VOICE_CHANNEL_FORCE_MOVE, {
|
||||
mod: userToConfigAccessibleUser(msg.author),
|
||||
member: memberToConfigAccessibleMember(args.member),
|
||||
oldChannel: channelToConfigAccessibleChannel(oldVoiceChannel!),
|
||||
newChannel: channelToConfigAccessibleChannel(channel),
|
||||
pluginData.getPlugin(LogsPlugin).logVoiceChannelForceMove({
|
||||
mod: msg.author,
|
||||
member: args.member,
|
||||
oldChannel: oldVoiceChannel!,
|
||||
newChannel: channel,
|
||||
});
|
||||
|
||||
sendSuccessMessage(pluginData, msg.channel, `**${args.member.user.tag}** moved to **${channel.name}**`);
|
||||
|
@ -179,11 +180,11 @@ export const VcmoveAllCmd = utilityCmd({
|
|||
continue;
|
||||
}
|
||||
|
||||
pluginData.state.logs.log(LogType.VOICE_CHANNEL_FORCE_MOVE, {
|
||||
mod: userToConfigAccessibleUser(msg.author),
|
||||
member: memberToConfigAccessibleMember(currMember),
|
||||
oldChannel: channelToConfigAccessibleChannel(args.oldChannel),
|
||||
newChannel: channelToConfigAccessibleChannel(channel),
|
||||
pluginData.getPlugin(LogsPlugin).logVoiceChannelForceMove({
|
||||
mod: msg.author,
|
||||
member: currMember,
|
||||
oldChannel: args.oldChannel,
|
||||
newChannel: channel,
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue