use of net.dv8tion.jda.core.entities.TextChannel in project Rubicon by Rubicon-Bot.
the class ServerLogHandler method onGuildVoiceJoin.
@Override
public void onGuildVoiceJoin(GuildVoiceJoinEvent event) {
if (!isEventEnabled(event.getGuild(), LogEventKeys.VOICE))
return;
TextChannel textChannel = getLogChannel(event.getGuild());
if (textChannel == null)
return;
EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder.setAuthor("A member created voice connection", null, event.getMember().getUser().getAvatarUrl());
embedBuilder.setDescription("**" + event.getMember().getEffectiveName() + " (" + event.getMember().getUser().getId() + ")** joined `" + event.getChannelJoined().getName() + "`");
embedBuilder.setColor(evVoiceLog);
sendLog(textChannel, embedBuilder);
}
use of net.dv8tion.jda.core.entities.TextChannel in project Rubicon by Rubicon-Bot.
the class ServerLogHandler method onGuildMemberRoleRemove.
@Override
public void onGuildMemberRoleRemove(GuildMemberRoleRemoveEvent event) {
if (!isEventEnabled(event.getGuild(), LogEventKeys.ROLE))
return;
TextChannel textChannel = getLogChannel(event.getGuild());
if (textChannel == null)
return;
EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder.setAuthor("A member role was updated", null, event.getUser().getAvatarUrl());
embedBuilder.setDescription("Removed **" + event.getRoles().get(0).getName() + "** from **" + event.getMember().getEffectiveName() + " (" + event.getMember().getUser().getId() + ")**");
embedBuilder.setColor(evRoleRemoved);
sendLog(textChannel, embedBuilder);
}
use of net.dv8tion.jda.core.entities.TextChannel in project Rubicon by Rubicon-Bot.
the class ServerLogHandler method onGuildBan.
@Override
public void onGuildBan(GuildBanEvent event) {
if (!isEventEnabled(event.getGuild(), LogEventKeys.BAN))
return;
TextChannel textChannel = getLogChannel(event.getGuild());
if (textChannel == null)
return;
bannedUsers.add(event.getUser().getIdLong());
EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder.setAuthor("A member was banned", null, event.getUser().getAvatarUrl());
embedBuilder.setDescription("**" + event.getUser().getName() + " (" + event.getUser().getId() + ")** was banned from the server");
embedBuilder.setColor(evBanColor);
sendLog(textChannel, embedBuilder);
}
use of net.dv8tion.jda.core.entities.TextChannel in project Rubicon by Rubicon-Bot.
the class ServerLogHandler method logCommand.
public static void logCommand(CommandManager.ParsedCommandInvocation parsedCommandInvocation) {
if (!isEventEnabled(parsedCommandInvocation.getMessage().getGuild(), LogEventKeys.COMMAND))
return;
TextChannel textChannel = getLogChannel(parsedCommandInvocation.getMessage().getGuild());
if (textChannel == null)
return;
EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder.setAuthor("A command was executed", null);
embedBuilder.setDescription("**" + parsedCommandInvocation.getMessage().getMember().getEffectiveName() + " (" + parsedCommandInvocation.getMessage().getMember().getUser().getId() + ")** executed `" + parsedCommandInvocation.getPrefix() + parsedCommandInvocation.getCommandInvocation() + "`");
embedBuilder.setColor(evCommandLog);
sendLog(textChannel, embedBuilder);
}
use of net.dv8tion.jda.core.entities.TextChannel in project Rubicon by Rubicon-Bot.
the class ServerLogHandler method onGuildVoiceLeave.
@Override
public void onGuildVoiceLeave(GuildVoiceLeaveEvent event) {
if (!isEventEnabled(event.getGuild(), LogEventKeys.VOICE))
return;
TextChannel textChannel = getLogChannel(event.getGuild());
if (textChannel == null)
return;
EmbedBuilder embedBuilder = new EmbedBuilder();
embedBuilder.setAuthor("A member closed voice connection", null, event.getMember().getUser().getAvatarUrl());
embedBuilder.setDescription("**" + event.getMember().getEffectiveName() + " (" + event.getMember().getUser().getId() + ")** left `" + event.getChannelLeft().getName() + "`");
embedBuilder.setColor(evVoiceLog);
sendLog(textChannel, embedBuilder);
}
Aggregations