Package de.presti.ree6.utils.others
Class FormatUtil
java.lang.Object
de.presti.ree6.utils.others.FormatUtil
From J MusicBot
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final StringA String containing the UTF-8 character for a repeat button.static final StringA String containing the UTF-8 character for a pause button.static final StringA String containing the UTF-8 character for a play button.static final StringA String containing the UTF-8 character for a shuffle button.static final StringA String containing the UTF-8 character for a stop button.
- 
Method SummaryModifier and TypeMethodDescriptionstatic StringFilter out @everyone and @here mentions from the given String.static StringformatTime(long duration) Formats the given duration into a String with the given Time.static StringgetStatusEmoji(lavalink.client.player.IPlayer audioPlayer) Get the current Status of theIPlayeras Emoji.static booleanCheck if the given string is an url.static StringlistOfRoles(List<net.dv8tion.jda.api.entities.Role> list, String query) Get a String of the Roles that match the querystatic StringlistOfTChannels(List<net.dv8tion.jda.api.entities.channel.concrete.TextChannel> list, String query) Get a String of the TextChannels that match the querystatic StringlistOfVChannels(List<net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel> list, String query) Get a String of the VoiceChannels that match the querystatic StringprogressBar(double percent) Build a progressbar by the percentage.static StringvolumeIcon(int volume) Get the Volume Emoji by the volume
- 
Field Details- 
PLAY_EMOJIA String containing the UTF-8 character for a play button.- See Also:
 
- 
PAUSE_EMOJIA String containing the UTF-8 character for a pause button.- See Also:
 
- 
STOP_EMOJIA String containing the UTF-8 character for a stop button.- See Also:
 
- 
LOOP_EMOJIA String containing the UTF-8 character for a repeat button.- See Also:
 
- 
SHUFFLE_EMOJIA String containing the UTF-8 character for a shuffle button.- See Also:
 
 
- 
- 
Method Details- 
formatTimeFormats the given duration into a String with the given Time.- Parameters:
- duration- The duration to format.
- Returns:
- A String containing the formatted duration.
 
- 
getStatusEmojiGet the current Status of theIPlayeras Emoji.- Parameters:
- audioPlayer- The- IPlayerto get the Status from.
- Returns:
- A String containing the current Status of the IPlayeras Emoji.
 
- 
progressBarBuild a progressbar by the percentage.- Parameters:
- percent- The percentage of the progressbar.
- Returns:
- A String containing the progressbar.
 
- 
volumeIconGet the Volume Emoji by the volume- Parameters:
- volume- The volume to get the Emoji from.
- Returns:
- A String containing the Volume Emoji.
 
- 
listOfTChannelspublic static String listOfTChannels(List<net.dv8tion.jda.api.entities.channel.concrete.TextChannel> list, String query) Get a String of the TextChannels that match the query- Parameters:
- list- The list of the TextChannels.
- query- The query to match.
- Returns:
- A String of the TextChannels that match the query.
 
- 
listOfVChannelspublic static String listOfVChannels(List<net.dv8tion.jda.api.entities.channel.concrete.VoiceChannel> list, String query) Get a String of the VoiceChannels that match the query- Parameters:
- list- The list of the VoiceChannels.
- query- The query to match.
- Returns:
- A String of the VoiceChannels that match the query.
 
- 
listOfRolesGet a String of the Roles that match the query- Parameters:
- list- The list of the Roles.
- query- The query to match.
- Returns:
- A String of the Roles that match the query.
 
- 
filterFilter out @everyone and @here mentions from the given String.- Parameters:
- input- The String to filter.
- Returns:
- A String without @everyone and @here mentions.
 
- 
isUrlCheck if the given string is an url.- Parameters:
- input- The string to check.
- Returns:
- True if the string is an url.
 
 
-