3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-07-14 13:57:19 +00:00

Add command to kick from VC

This commit is contained in:
Dark 2020-11-19 18:53:59 +01:00
parent bc5455bf9f
commit 02084bfe3e
6 changed files with 62 additions and 3 deletions

View file

@ -10,6 +10,7 @@ import {
import { sendErrorMessage, sendSuccessMessage } from "../../../pluginUtils";
import { VoiceChannel } from "eris";
import { LogType } from "../../../data/LogType";
import { cons } from "fp-ts/lib/Array";
export const VcmoveCmd = utilityCmd({
trigger: "vcmove",
@ -25,8 +26,6 @@ export const VcmoveCmd = utilityCmd({
async run({ message: msg, args, pluginData }) {
let channel: VoiceChannel;
const foo = args.member;
if (isSnowflake(args.channel)) {
// Snowflake -> resolve channel directly
const potentialChannel = pluginData.guild.channels.get(args.channel);
@ -77,7 +76,7 @@ export const VcmoveCmd = utilityCmd({
channelID: channel.id,
});
} catch (e) {
msg.channel.createMessage(errorMessage("Failed to move member"));
sendErrorMessage(pluginData, msg.channel, "Failed to move member");
return;
}