allow banner and avatar command to be global
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 34s
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 34s
This commit is contained in:
parent
290c25ee43
commit
fa205d7ff2
@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
|
||||
* @author Nick (okNick)
|
||||
*/
|
||||
@Component
|
||||
@CommandInfo(name = "avatar", description = "View the avatar of the guild or a user")
|
||||
@CommandInfo(name = "avatar", description = "View the avatar of the guild or a user", guildOnly = false)
|
||||
public class AvatarCommand extends BatCommand {
|
||||
@Autowired
|
||||
public AvatarCommand(@NonNull ApplicationContext context) {
|
||||
|
@ -11,7 +11,7 @@ import org.springframework.stereotype.Component;
|
||||
* @author Nick (okNick)
|
||||
*/
|
||||
@Component
|
||||
@CommandInfo(name = "banner", description = "View the banner of the guild or a user")
|
||||
@CommandInfo(name = "banner", description = "View the banner of the guild or a user", guildOnly = false)
|
||||
public class BannerCommand extends BatCommand {
|
||||
@Autowired
|
||||
public BannerCommand(@NonNull ApplicationContext context) {
|
||||
|
@ -21,7 +21,6 @@ public class GuildSubCommand extends BatSubCommand {
|
||||
@Override
|
||||
public void execute(BatGuild guild, @NonNull BatUser user, @NonNull MessageChannel channel, Member member, @NonNull SlashCommandInteraction interaction) {
|
||||
ImageProxy banner = guild.getDiscordGuild().getBanner();
|
||||
|
||||
if (banner == null) {
|
||||
interaction.replyEmbeds(EmbedUtils.errorEmbed()
|
||||
.setDescription("%s does not have a banner!".formatted(guild.getName()))
|
||||
|
@ -38,7 +38,6 @@ public class UserSubCommand extends BatSubCommand {
|
||||
|
||||
User target = userOption.getAsUser();
|
||||
ImageProxy banner = target.retrieveProfile().complete().getBanner();
|
||||
|
||||
if (banner == null) {
|
||||
interaction.replyEmbeds(EmbedUtils.errorEmbed()
|
||||
.setDescription("%s does not have a banner!".formatted(target.getName()))
|
||||
|
Loading…
Reference in New Issue
Block a user