content: package events.discordevents.buttonclick;
  
  import constants.Language;
  import core.EmbedFactory;
  import core.TextManager;
  import events.discordevents.DiscordEvent;
  import events.discordevents.EventPriority;
  import events.discordevents.eventtypeabstracts.ButtonClickAbstract;
  import mysql.hibernate.EntityManagerWrapper;
  import net.dv8tion.jda.api.EmbedBuilder;
  import net.dv8tion.jda.api.events.interaction.component.ButtonInteractionEvent;
  
  import java.util.Locale;
  
  @DiscordEvent(priority = EventPriority.LOW)
  public class ButtonClickExpired extends ButtonClickAbstract {
  
      @Override
      public boolean onButtonClick(ButtonInteractionEvent event, EntityManagerWrapper entityManager) {
          Locale locale = event.getGuild() != null ? entityManager.findGuildEntity(event.getGuild().getIdLong()).getLocale() : Language.EN.getLocale();
          EmbedBuilder eb = EmbedFactory.getEmbedError()
                  .setTitle(TextManager.getString(locale, TextManager.GENERAL, "button_listener_expired_title"))
                  .setDescription(TextManager.getString(locale, TextManager.GENERAL, "button_listener_expired_desc"));
  
          event.replyEmbeds(eb.build())
                  .setEphemeral(true)
                  .queue();
          return false;
      }
  
  }
  