Merge pull request 'Fix NPE caused by default avatars + make MemberCountCommand message consistent' (#2) from okNick/Bat:master into master

Reviewed-on: Fascinated/Bat#2
This commit is contained in:
Lee 2024-06-28 20:38:26 +00:00
commit 71158fd477
2 changed files with 2 additions and 2 deletions

View File

@ -38,7 +38,7 @@ public class UserSubCommand extends BatSubCommand {
User target = userOption.getAsUser();
interaction.replyEmbeds(EmbedUtils.genericEmbed()
.setAuthor("%s's Avatar".formatted(target.getName()), null, target.getEffectiveAvatarUrl())
.setImage(target.getAvatar().getUrl(4096))
.setImage(target.getEffectiveAvatarUrl())
.build()
).queue();
}

View File

@ -23,7 +23,7 @@ public class MemberCountCommand extends BatCommand {
public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction interaction) {
EmbedBuilder embed = EmbedUtils.genericEmbed().setAuthor("Member Count");
Guild discordGuild = guild.getDiscordGuild();
embed.setDescription(discordGuild.getName() + " has a total of " + discordGuild.getMembers().size() + " members.");
embed.setDescription("**%s** has a total of %s members.".formatted(discordGuild.getName(), discordGuild.getMembers().size()));
interaction.replyEmbeds(embed.build()).queue();
}
}