Bat/src/main/java/cc/fascinated/bat/common/TextChannelUtils.java
Liam cdd953351a
All checks were successful
Deploy to Dokku / docker (ubuntu-latest) (push) Successful in 40s
add emoji logs and fix log channels that are set from vanishing
2024-07-04 05:10:35 +01:00

33 lines
720 B
Java

package cc.fascinated.bat.common;
import lombok.experimental.UtilityClass;
/**
* @author Fascinated (fascinated7)
*/
@UtilityClass
public class TextChannelUtils {
/**
* Checks if a channel is valid
*
* @param id the id of the channel
* @return if the channel is valid
*/
public static boolean isValidChannel(String id) {
if (id == null) {
return false;
}
return ChannelUtils.getTextChannel(id) != null;
}
/**
* Gets the mention of a channel
*
* @param id the id of the channel
* @return the mention of the channel
*/
public static String getChannelMention(String id) {
return "<#" + id + ">";
}
}