Search in sources :

Example 51 with GuildVoiceState

use of net.dv8tion.jda.api.entities.GuildVoiceState in project Robertify-Bot by bombies.

the class PauseSlashCommand method onSlashCommand.

@Override
public void onSlashCommand(@NotNull SlashCommandEvent event) {
    if (!checks(event))
        return;
    sendRandomMessage(event);
    event.deferReply().queue();
    final GuildVoiceState memberVoiceState = event.getMember().getVoiceState();
    final GuildVoiceState selfVoiceState = event.getGuild().getSelfMember().getVoiceState();
    event.getHook().sendMessageEmbeds(new PauseCommand().handlePauseEvent(event.getGuild(), selfVoiceState, memberVoiceState).build()).setEphemeral(false).queue();
}
Also used : GuildVoiceState(net.dv8tion.jda.api.entities.GuildVoiceState) PauseCommand(main.commands.prefixcommands.audio.PauseCommand)

Aggregations

GuildVoiceState (net.dv8tion.jda.api.entities.GuildVoiceState)51 EmbedBuilder (net.dv8tion.jda.api.EmbedBuilder)16 Member (net.dv8tion.jda.api.entities.Member)16 LogUtils (main.utils.json.logs.LogUtils)13 AudioManager (net.dv8tion.jda.api.managers.AudioManager)12 Guild (net.dv8tion.jda.api.entities.Guild)11 TextChannel (net.dv8tion.jda.api.entities.TextChannel)9 VoiceChannel (net.dv8tion.jda.api.entities.VoiceChannel)9 ArrayList (java.util.ArrayList)7 Permission (net.dv8tion.jda.api.Permission)5 CommandFlag (at.xirado.bean.command.CommandFlag)4 SlashCommand (at.xirado.bean.command.SlashCommand)4 SlashCommandContext (at.xirado.bean.command.SlashCommandContext)4 EmbedUtil (at.xirado.bean.misc.EmbedUtil)4 Message (net.dv8tion.jda.api.entities.Message)4 Bean (at.xirado.bean.Bean)3 GenericCommand (at.xirado.bean.command.GenericCommand)3 MessageContextCommand (at.xirado.bean.command.context.MessageContextCommand)3 UserContextCommand (at.xirado.bean.command.context.UserContextCommand)3 MockContextMenuCommand (at.xirado.bean.command.context.message.MockContextMenuCommand)3