package cc.fascinated.bat.features.reminder; import cc.fascinated.bat.common.ChannelUtils; import lombok.AllArgsConstructor; import lombok.Getter; import net.dv8tion.jda.api.entities.channel.concrete.TextChannel; import java.util.Date; /** * @author Fascinated (fascinated7) */ @AllArgsConstructor @Getter public class Reminder { /** * What we should remind the user of */ private final String reminder; /** * The channel ID to send the reminder to */ private final String channelId; /** * The date the reminder should end */ private final Date endDate; /** * Check if the reminder is expired * * @return If the reminder is expired */ public boolean isExpired() { return System.currentTimeMillis() >= endDate.getTime(); } /** * Get the channel to send the reminder to * * @return The channel */ public TextChannel getChannel() { return ChannelUtils.getTextChannel(channelId); } }