Java Code Examples for net.dv8tion.jda.api.EmbedBuilder#setFooter()

The following examples show how to use net.dv8tion.jda.api.EmbedBuilder#setFooter() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: MemberMuteAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getTargetUser() == null) {
        return;
    }
    Boolean global = action.getAttribute(GLOBAL_ATTR, Boolean.class);
    embedBuilder.setDescription(messageService.getMessage(Boolean.TRUE.equals(global)
                    ? "audit.member.mute.message.global" : "audit.member.mute.message",
            getReferenceContent(action.getTargetUser(), false)));

    addModeratorField(action, embedBuilder);
    addChannelField(action, embedBuilder);
    addReasonField(action, embedBuilder);
    addExpirationField(action, embedBuilder);

    Integer duration = action.getAttribute(DURATION_ATTR, Integer.class);
    if (duration != null) {
        embedBuilder.addField(messageService.getMessage("audit.member.mute.duration.title"),
                String.valueOf(duration), true);
    }

    embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getTargetUser().getId()), null);
}
 
Example 2
Source File: MemberWarnAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getTargetUser() == null) {
        return;
    }
    String message = messageService.getMessage("audit.member.warn.message",
            getReferenceContent(action.getTargetUser(), false));
    embedBuilder.setDescription(message);

    addModeratorField(action, embedBuilder);

    Number count = action.getAttribute(COUNT_ATTR, Number.class);
    if (count != null) {
        embedBuilder.addField(messageService.getMessage("audit.member.warn.count.title"),
                messageService.getMessage("audit.member.warn.count.content", count), true);
    }

    addReasonField(action, embedBuilder);
    addExpirationField(action, embedBuilder);

    embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getTargetUser().getId()), null);
}
 
Example 3
Source File: MessageEditAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    String messageId = action.getAttribute(MESSAGE_ID, String.class);
    if (action.getChannel() == null || action.getUser() == null || messageId == null) {
        return;
    }

    embedBuilder.setDescription(messageService.getMessage("audit.message.edit.message",
            String.valueOf(action.getGuildId()),
            action.getChannel().getId(),
            messageId));

    addOldContentField(action, embedBuilder);
    embedBuilder.addField(messageService.getMessage("audit.message.newContent.title"),
            getMessageValue(action, NEW_CONTENT), false);

    addAuthorField(action, embedBuilder);
    addChannelField(action, embedBuilder);

    embedBuilder.setFooter(messageService.getMessage("audit.message.id", messageId), null);
}
 
Example 4
Source File: ServerInfoCommand.java    From JuniperBot with GNU General Public License v3.0 6 votes vote down vote up
@Override
public boolean doCommand(GuildMessageReceivedEvent message, BotContext context, String query) {
    Guild guild = message.getGuild();

    EmbedBuilder builder = messageService.getBaseEmbed();
    builder.setTitle(messageService.getMessage("discord.command.server.title", guild.getName()));
    builder.setThumbnail(guild.getIconUrl());
    builder.setFooter(messageService.getMessage("discord.command.info.identifier", guild.getId()), null);

    builder.addField(getMemberListField(guild));
    builder.addField(getChannelListField(guild));
    builder.addField(getShard(guild));
    builder.addField(getVerificationLevel(guild.getVerificationLevel()));
    builder.addField(getRegion(guild));
    builder.addField(getOwner(guild));
    builder.addField(getCreatedAt(guild, context));

    messageService.sendMessageSilent(message.getChannel()::sendMessage, builder.build());
    return true;
}
 
Example 5
Source File: MessageDeleteAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 6 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    String messageId = action.getAttribute(MESSAGE_ID, String.class);
    if (action.getChannel() == null || action.getUser() == null || messageId == null) {
        return;
    }

    embedBuilder.setDescription(messageService.getMessage("audit.message.delete.message",
            String.valueOf(action.getGuildId()),
            action.getChannel().getId(),
            messageId));

    embedBuilder.addField(messageService.getMessage("audit.message.deletedContent.title"),
            getMessageValue(action, OLD_CONTENT), false);
    addAuthorField(action, embedBuilder);
    addChannelField(action, embedBuilder);

    embedBuilder.setFooter(messageService.getMessage("audit.message.id", messageId), null);
}
 
Example 6
Source File: MemberJoinAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getUser() == null) {
        return;
    }
    String message = messageService.getMessage("audit.member.join.message",
            getReferenceContent(action.getUser(), false));
    embedBuilder.setDescription(message);
    embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getUser().getId()), null);
}
 
Example 7
Source File: VoiceLeaveAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getChannel() != null && action.getUser() != null) {
        embedBuilder.setDescription(getUserMessage(action, "audit.message.voice.leave.message"));
        embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getUser().getId()), null);
    }
}
 
Example 8
Source File: MemberBanAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getTargetUser() == null) {
        return;
    }
    embedBuilder.setDescription(messageService.getMessage("audit.member.ban.message",
            getReferenceContent(action.getTargetUser(), false)));

    addModeratorField(action, embedBuilder);
    addReasonField(action, embedBuilder);
    addExpirationField(action, embedBuilder);

    embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getTargetUser().getId()), null);
}
 
Example 9
Source File: NicknameChangeAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getUser() != null) {
        embedBuilder.setDescription(messageService.getMessage("audit.message.nickname.change.message",
                getReferenceContent(action.getUser(), false)));

        embedBuilder.addField(messageService.getMessage("audit.message.nickname.old.title"),
                action.getAttribute(OLD_NAME, String.class), true);
        embedBuilder.addField(messageService.getMessage("audit.message.nickname.new.title"),
                action.getAttribute(NEW_NAME, String.class), true);

        embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getUser().getId()), null);
    }
}
 
Example 10
Source File: MemberLeaveAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getUser() == null) {
        return;
    }
    String message = messageService.getMessage("audit.member.leave.message",
            getReferenceContent(action.getUser(), false));
    embedBuilder.setDescription(message);
    embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getUser().getId()), null);
}
 
Example 11
Source File: VoiceJoinAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getChannel() != null && action.getUser() != null) {
        embedBuilder.setDescription(getUserMessage(action, "audit.message.voice.join.message"));
        embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getUser().getId()), null);
    }
}
 
Example 12
Source File: MessageServiceImpl.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
public EmbedBuilder getBaseEmbed(boolean copyright) {
    EmbedBuilder builder = new EmbedBuilder().setColor(contextService.getColor());
    if (copyright) {
        builder.setFooter(getMessage("about.copy.content", Year.now()),
                commonProperties.getBranding().getCopyrightIconUrl());
    }
    return builder;
}
 
Example 13
Source File: MemberKickAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getTargetUser() == null) {
        return;
    }
    String message = messageService.getMessage("audit.member.kick.message",
            getReferenceContent(action.getTargetUser(), false));
    embedBuilder.setDescription(message);

    addModeratorField(action, embedBuilder);
    addReasonField(action, embedBuilder);

    embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getTargetUser().getId()), null);
}
 
Example 14
Source File: MemberUnBanAuditForwardProvider.java    From JuniperBot with GNU General Public License v3.0 5 votes vote down vote up
@Override
protected void build(AuditAction action, MessageBuilder messageBuilder, EmbedBuilder embedBuilder) {
    if (action.getTargetUser() == null) {
        return;
    }
    embedBuilder.setDescription(messageService.getMessage("audit.member.unban.message",
            getReferenceContent(action.getTargetUser(), false)));

    embedBuilder.setFooter(messageService.getMessage("audit.member.id", action.getTargetUser().getId()), null);
}
 
Example 15
Source File: DiscordBotServer.java    From MtgDesktopCompanion with GNU General Public License v3.0 4 votes vote down vote up
private void analyseCard(MessageReceivedEvent event) {
	logger.debug("Received message :" + event.getMessage().getContentRaw() + " from " + event.getAuthor().getName()+ " in #" + event.getChannel().getName());
	final List<MagicCard> liste = new ArrayList<>();
	Pattern p = Pattern.compile(getString(REGEX));
	Matcher m = p.matcher(event.getMessage().getContentRaw());
	if(m.find())
	{
		String name=m.group(1).trim();
		MagicEdition ed = null;
		if(name.contains("|"))
		{
			ed = new MagicEdition();
			ed.setId(name.substring(name.indexOf('|')+1,name.length()).toUpperCase().trim());
			name=name.substring(0, name.indexOf('|')).trim();
		}
		
		MessageChannel channel = event.getChannel();
			channel.sendTyping().queue();

			try {
				liste.addAll(MTGControler.getInstance().getEnabled(MTGCardsProvider.class).searchCardByName(name, ed, false));
			}
			catch(Exception e)
			{
				logger.error(e);
			}
			
			if(liste.isEmpty())
			{
				channel.sendMessage("Sorry i can't found "+name ).queue();
				return;
			}
			
			NavigableEmbed.Builder builder = new NavigableEmbed.Builder(event.getChannel());
			for (int x = 0; x < liste.size(); x++) {
				MagicCard result = liste.get(x);
				BiFunction<MagicCard, Integer, MessageEmbed> getEmbed = (c, resultIndex) -> {
					MessageEmbed embed=parseCard(result);
					EmbedBuilder eb = new EmbedBuilder(embed);
					if (liste.size() > 1)
						eb.setFooter("Result " + (resultIndex + 1) + "/" + liste.size(), null);
					
					return eb.build();
				};
				int finalIndex = x;
				builder.addEmbed(() -> getEmbed.apply(result, finalIndex));
			}
			
			NavigableEmbed navEb = builder.build();
			
			
			if(liste.size()>1)
			{
				applyControl(EmbedButton.PREVIOUS.getIcon(), navEb.getMessage(), navEb.getWidth() > 1);
				applyControl(EmbedButton.NEXT.getIcon(), navEb.getMessage(), navEb.getWidth() > 1);
		
				ReactionListener rl = new ReactionListener(jda, navEb.getMessage(), false, 30L * 1000L);
				rl.addController(event.getAuthor());
				rl.addResponse(EmbedButton.PREVIOUS.getIcon(), ev -> {
					navEb.setY(0);
					if (navEb.getX() > 0) navEb.left();
					applyControl(EmbedButton.PREVIOUS.getIcon(), navEb.getMessage(), navEb.getWidth() > 1);
				});
				rl.addResponse(EmbedButton.NEXT.getIcon(), ev -> {
					navEb.setY(0);
					if (navEb.getX() < navEb.getWidth() - 1) navEb.right();
					applyControl(EmbedButton.NEXT.getIcon(), navEb.getMessage(), navEb.getWidth() > 1);
				});

			}
		}	
		
	
	
}
 
Example 16
Source File: UserInfoCommand.java    From JuniperBot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean doCommand(MemberReference reference, GuildMessageReceivedEvent event, BotContext context, String query) {
    DateTimeFormatter formatter = DateTimeFormat.mediumDateTime()
            .withLocale(contextService.getLocale())
            .withZone(context.getTimeZone());

    LocalMember localMember = reference.getLocalMember();
    LocalUser localUser = reference.getLocalUser();

    EmbedBuilder builder = messageService.getBaseEmbed();
    builder.setTitle(messageService.getMessage("discord.command.user.title", reference.getEffectiveName()));
    builder.setThumbnail(reference.getEffectiveAvatarUrl());
    builder.setFooter(messageService.getMessage("discord.command.info.identifier", reference.getId()), null);

    StringBuilder commonBuilder = new StringBuilder();
    getName(commonBuilder, reference);

    if (reference.getMember() != null) {
        Member member = reference.getMember();
        getOnlineStatus(commonBuilder, member);
        if (CollectionUtils.isNotEmpty(member.getActivities())) {
            getActivities(commonBuilder, member);
        }
        if (member.getOnlineStatus() == OnlineStatus.OFFLINE || member.getOnlineStatus() == OnlineStatus.INVISIBLE) {
            if (localUser != null && localUser.getLastOnline() != null) {
                getLastOnlineAt(commonBuilder, localUser, formatter);
            }
        }
        getJoinedAt(commonBuilder, member, formatter);
        getCreatedAt(commonBuilder, member.getUser(), formatter);
    }

    builder.addField(messageService.getMessage("discord.command.user.common"), commonBuilder.toString(), false);

    Guild guild = event.getGuild();

    if (localMember != null) {
        RankingConfig config = rankingConfigService.get(event.getGuild());
        if (config != null && config.isEnabled()) {
            RankingInfo info = rankingService.getRankingInfo(event.getGuild().getIdLong(), reference.getId());
            rankCommand.addFields(builder, config, info, guild);
        }
    }

    MemberBio memberBio = bioRepository.findByGuildIdAndUserId(guild.getIdLong(), reference.getId());
    String bio = memberBio != null ? memberBio.getBio() : null;
    if (StringUtils.isEmpty(bio)
            && Objects.equals(event.getAuthor(), reference.getUser())
            && !commandsService.isRestricted(BioCommand.KEY, event.getChannel(), event.getMember())) {
        String bioCommand = messageService.getMessageByLocale("discord.command.bio.key",
                context.getCommandLocale());
        bio = messageService.getMessage("discord.command.user.bio.none", context.getConfig().getPrefix(),
                bioCommand);
    }
    if (StringUtils.isNotEmpty(bio)) {
        builder.setDescription(CommonUtils.trimTo(bio, MessageEmbed.TEXT_MAX_LENGTH));
    }
    messageService.sendMessageSilent(event.getChannel()::sendMessage, builder.build());
    return true;
}
 
Example 17
Source File: IndividualHandler.java    From JuniperBot with GNU General Public License v3.0 4 votes vote down vote up
public boolean sendChoiceMessage(MafiaInstance instance, String welcomeCode, Long endDelay, boolean pass) {
    MafiaPlayer individual = instance.getPlayerByRole(individualRole);
    if (individual == null) {
        return false;
    }

    EmbedBuilder builder = getBaseEmbed(welcomeCode);
    builder.setFooter(messageService.getMessage("mafia.invidual.choice.footer", getEndTimeText(instance,
            endDelay != null ? endDelay : INDIVIDUAL_DELAY)), null);
    List<MafiaPlayer> players = new ArrayList<>(instance.getAlive());
    players.remove(individual);
    if (!players.isEmpty()) {
        builder.addField(messageService.getMessage("mafia.start.playerList.title"),
                getPlayerList(players), false);
    }

    return openPrivateChannel(individual, channel -> {
        channel.sendMessage(builder.build()).queue(message -> {
            try {
                for (int i = 0; i < players.size(); i++) {
                    message.addReaction(ReactionsListener.CHOICES[i]).queue();
                }
            } catch (Exception ex) {
                // ignore
            }
            instance.getListenedMessages().add(message.getId());
            reactionsListener.onReactionAdd(message.getId(), event -> {
                if (!event.getUser().equals(event.getJDA().getSelfUser()) && !event.getUser().isBot() && choiceStates.contains(instance.getState())) {
                    String emote = event.getReaction().getReactionEmote().getName();
                    int index = ArrayUtils.indexOf(ReactionsListener.CHOICES, emote);
                    if (index >= 0 && index < players.size()) {
                        MafiaPlayer player = players.get(index);
                        contextService.withContext(instance.getGuild(), () -> {
                            if (player != null) {
                                instance.tick();
                                choiceAction(instance, player, channel);
                            }
                            contextService.withContextAsync(instance.getGuild(), () -> {
                                if (pass && instance.done(event.getUser())) {
                                    mafiaService.stop(instance);
                                }
                            });
                        });
                        return true;
                    }
                }
                return false;
            });
        });
    });
}
 
Example 18
Source File: MeetingHandler.java    From JuniperBot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean onStart(User user, MafiaInstance instance) {
    instance.tick();
    instance.setState(MafiaState.MEETING);

    EmbedBuilder builder = getBaseEmbed("mafia.meeting.welcome");
    builder.addField(messageService.getMessage("mafia.start.playerList.title"),
            getPlayerList(instance.getPlayers()), false);
    if (MEETING_DELAY >= 60000) {
        builder.setFooter(messageService.getMessage("mafia.meeting.welcome.footer",
                getEndTimeText(instance, MEETING_DELAY)), null);
    }

    TextChannel channel = instance.getChannel();
    if (channel == null) {
        return true; // end for non existent channel instantly
    }

    channel.sendMessage(builder.build()).queue();
    createGoonChannel(instance, instance::setGoonChannel);

    if (!sendMessage(instance.getDoctor(), "mafia.meeting.doctor.welcome")) {
        instance.setEndReason(messageService.getMessage("mafia.end.reason.couldNotDM",
                instance.getDoctor().getName()));
        return true;
    }

    if (!sendMessage(instance.getBroker(), "mafia.meeting.broker.welcome")) {
        instance.setEndReason(messageService.getMessage("mafia.end.reason.couldNotDM",
                instance.getBroker().getName()));
        return true;
    }
    if (instance.getCop() != null) {
        if (!copHandler.sendChoiceMessage(instance, "mafia.meeting.cop.welcome", MEETING_DELAY, false)) {
            instance.setEndReason(messageService.getMessage("mafia.end.reason.couldNotDM",
                    instance.getCop().getName()));
            return true;
        }
    }
    return scheduleEnd(instance, MEETING_DELAY);
}
 
Example 19
Source File: GoonHandler.java    From JuniperBot with GNU General Public License v3.0 4 votes vote down vote up
@Override
public boolean onStart(User user, MafiaInstance instance) {
    instance.setState(MafiaState.NIGHT_GOON);

    MafiaPlayer exiledPlayer = instance.getDailyActions().get(MafiaActionType.EXILE);

    boolean endOfGame = false;
    StringBuilder stringBuilder = new StringBuilder();
    if (exiledPlayer != null) {
        outPlayer(instance, exiledPlayer);
        String roleName = messageService.getEnumTitle(exiledPlayer.getRole());
        stringBuilder.append(messageService.getMessage("mafia.night.start.exiled", roleName,
                exiledPlayer.getName()));

        boolean hasAnyMafia = instance.hasAnyMafia();
        boolean hasAnyTownie = instance.hasAnyTownie();
        if (!hasAnyMafia && !hasAnyTownie) {
            stringBuilder.append("\n\n").append(messageService.getMessage("mafia.end.standoff"));
            endOfGame = true;
        } else if (!hasAnyMafia) {
            stringBuilder.append("\n\n").append(messageService.getMessage("mafia.end.townies-wins"));
            endOfGame = true;
        } else if (!hasAnyTownie) {
            stringBuilder.append("\n\n").append(messageService.getMessage("mafia.end.mafia-wins"));
            endOfGame = true;
        }
    }

    if (!endOfGame) {
        stringBuilder.append("\n\n").append(messageService.getMessage("mafia.night.start"));
    }

    EmbedBuilder embedBuilder = getBaseEmbed();
    embedBuilder.setDescription(stringBuilder.toString());

    TextChannel channel = instance.getChannel();
    if (channel == null) {
        return true; // end for non existent channel instantly
    }

    channel.sendMessage(embedBuilder.build()).queue();
    if (endOfGame) {
        instance.setIgnoredReason();
        return true;
    }

    if (instance.getGoons().isEmpty()) {
        return brokerHandler.onStart(user, instance);
    }

    List<MafiaPlayer> players = new ArrayList<>(instance.getAlive());
    MessageBuilder builder = new MessageBuilder();

    GuildConfig config = configService.get(instance.getGuild());
    String nextCommand = messageService.getMessageByLocale("discord.command.mafia.done.key", config.getCommandLocale());

    EmbedBuilder embed = getBaseEmbed("mafia.goon.choice");
    embed.addField(messageService.getMessage("mafia.start.playerList.title"),
            getPlayerList(players), false);
    embed.setFooter(messageService.getMessage("mafia.goon.choice.footer",
            getEndTimeText(instance, DAY_DELAY), instance.getPrefix(), nextCommand), null);
    builder.setEmbed(embed.build());
    builder.setContent(instance.getGoonsMentions());

    TextChannel goonChannel = instance.getGoonChannel();
    if (goonChannel == null) {
        return true; // goon channel non exists anymore
    }
    goonChannel.sendMessage(builder.build())
            .queue(message -> sendChoice(instance, message, instance.getGoons()));
    return scheduleEnd(instance, DAY_DELAY);
}
 
Example 20
Source File: AudioMessageManager.java    From JuniperBot with GNU General Public License v3.0 4 votes vote down vote up
public void onQueue(PlaybackInstance instance, MessageChannel sourceChannel, BotContext context, int pageNum) {
    List<TrackRequest> requests = instance.getQueue();
    if (requests.isEmpty()) {
        onEmptyQueue(sourceChannel);
        return;
    }

    final int pageSize = 25;
    List<List<TrackRequest>> parts = Lists.partition(requests, pageSize);
    final int totalPages = parts.size();
    final int offset = (pageNum - 1) * pageSize + 1 + instance.getCursor();

    final long totalDuration = requests.stream()
            .filter(Objects::nonNull)
            .map(TrackRequest::getTrack)
            .filter(Objects::nonNull)
            .mapToLong(AudioTrack::getDuration).sum();

    if (pageNum > totalPages) {
        onQueueError(sourceChannel, "discord.command.audio.queue.list.totalPages", parts.size());
        return;
    }
    List<TrackRequest> pageRequests = parts.get(pageNum - 1);

    EmbedBuilder builder = getQueueMessage();
    if (instance.getCursor() > 0) {
        builder.setDescription(messageService.getMessage("discord.command.audio.queue.list.playlist.played",
                instance.getCursor(), commonProperties.getBranding().getWebsiteUrl(), instance.getPlaylistUuid()));
    } else {
        builder.setDescription(messageService.getMessage("discord.command.audio.queue.list.playlist",
                commonProperties.getBranding().getWebsiteUrl(), instance.getPlaylistUuid()));
    }

    addQueue(builder, instance, pageRequests, offset, false);

    String queueCommand = messageService.getMessageByLocale("discord.command.queue.key", context.getCommandLocale());

    builder.setFooter(totalPages > 1
            ? messageService.getMessage("discord.command.audio.queue.list.pageFooter",
            pageNum, totalPages, requests.size(), CommonUtils.formatDuration(totalDuration),
            context.getConfig().getPrefix(), queueCommand)
            : messageService.getMessage("discord.command.audio.queue.list.footer",
            requests.size(), CommonUtils.formatDuration(totalDuration)), null);
    messageService.sendMessageSilent(sourceChannel::sendMessage, builder.build());
}