Discord bot that plays music from every website ever via youtube-dl
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Chords/src/main/java/moe/nekojimi/chords/commands/LeaveCommand.java

29 lines
654 B

/*
* To change this license header, choose License Headers in Project Properties.
* To change this template file, choose Tools | Templates
* and open the template in the editor.
*/
package moe.nekojimi.chords.commands;
import java.util.List;
import moe.nekojimi.chords.Chords;
import net.dv8tion.jda.api.events.message.guild.GuildMessageReceivedEvent;
public class LeaveCommand extends Command
{
public LeaveCommand(Chords bot)
{
super(bot, "leave");
}
@Override
public void call(Invocation invocation)
{
if (bot.getCurrentVoiceChannel() != null)
{
bot.disconnect();
}
}
}