Improve mentions in default log messages. Add !vcmove logging. Don't attempt to !vcmove to the same channel the user is already in.
This commit is contained in:
parent
cdd977c131
commit
e755784483
3 changed files with 48 additions and 32 deletions
|
@ -685,6 +685,13 @@ export class UtilityPlugin extends ZeppelinPlugin<IBasePluginConfig, IUtilityPlu
|
|||
return;
|
||||
}
|
||||
|
||||
if (args.member.voiceState.channelID === channel.id) {
|
||||
msg.channel.createMessage(errorMessage("Member is already on that channel!"));
|
||||
return;
|
||||
}
|
||||
|
||||
const oldVoiceChannel = this.guild.channels.get(args.member.voiceState.channelID);
|
||||
|
||||
try {
|
||||
await args.member.edit({
|
||||
channelID: channel.id,
|
||||
|
@ -694,6 +701,13 @@ export class UtilityPlugin extends ZeppelinPlugin<IBasePluginConfig, IUtilityPlu
|
|||
return;
|
||||
}
|
||||
|
||||
this.logs.log(LogType.VOICE_CHANNEL_FORCE_MOVE, {
|
||||
mod: stripObjectToScalars(msg.author),
|
||||
member: stripObjectToScalars(args.member, ["user"]),
|
||||
oldChannel: stripObjectToScalars(oldVoiceChannel),
|
||||
newChannel: stripObjectToScalars(channel),
|
||||
});
|
||||
|
||||
msg.channel.createMessage(
|
||||
successMessage(`**${args.member.user.username}#${args.member.user.discriminator}** moved to **${channel.name}**`),
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue