Package de.presti.ree6.utils.data
Class ArrayUtil
java.lang.Object
de.presti.ree6.utils.data.ArrayUtil
Utility class used to store Data for a shorter period of time.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final String[]
String Array used to store answer options, for later use by the 8Ball command.HashMap used to store conversations between the user and the Chat-GPT implementation.HashMap used to store a users Ids, to keep them from spamming commands.HashMap used to store message contents and their IDs, to show the content when the message gets deleted.HashMap used to store user Ids that are associated with a message, to show the content when the message gets deleted.HashMap used to store Guild ID and the message of a music Panel.an Arraylist containing every temporal Voice-channel Id.static final List<net.dv8tion.jda.api.entities.Member>
HashMap used to store a users Ids, to keep them from earning XP with every message.HashMap used to store user Ids and their VC join time, to track VoiceXP. -
Method Summary
Modifier and TypeMethodDescriptionstatic net.dv8tion.jda.api.entities.Message
Get the Message content, of a deleted Message, by the ID.static net.dv8tion.jda.api.entities.Message
Get the Message content, of a deleted Message, by the ID.static String
getRandomString
(int length) Get a String fully of random Number by the given length.static net.dv8tion.jda.api.entities.User
Get the User from that send a specific Message that has been deleted.static boolean
isTemporalVoicechannel
(net.dv8tion.jda.api.entities.channel.middleman.AudioChannel channel) Check if the channel is a temporal Voice-channel.
-
Field Details
-
chatGPTMessages
public static final Map<String,List<com.lilittlecat.chatgpt.offical.entity.Message>> chatGPTMessagesHashMap used to store conversations between the user and the Chat-GPT implementation. These are being stored guild specific so Ree6 will not continue a conversation in another guild. While at the same time we store them in memory to protect users privacy, since there is no actual reason for us to keep these longer then the current application uptime. -
messageIDwithMessage
HashMap used to store message contents and their IDs, to show the content when the message gets deleted. -
messageIDwithUser
HashMap used to store user Ids that are associated with a message, to show the content when the message gets deleted. -
voiceJoined
HashMap used to store user Ids and their VC join time, to track VoiceXP. -
musicPanelList
HashMap used to store Guild ID and the message of a music Panel. -
commandCooldown
HashMap used to store a users Ids, to keep them from spamming commands. -
timeout
HashMap used to store a users Ids, to keep them from earning XP with every message. -
temporalVoicechannel
an Arraylist containing every temporal Voice-channel Id. -
answers
String Array used to store answer options, for later use by the 8Ball command.
-
-
Method Details
-
getRandomString
Get a String fully of random Number by the given length.- Parameters:
length
- the wanted Length.- Returns:
- the
String
with the wanted Length.
-
getUserFromMessageList
Get the User from that send a specific Message that has been deleted.- Parameters:
id
- the ID of the Message.- Returns:
- the
User
that send the Message.
-
getMessageFromMessageList
Get the Message content, of a deleted Message, by the ID.- Parameters:
id
- the ID of the Message.- Returns:
- the
Message
Entity of the deleted Message.
-
getMessageFromMessageListAndRemove
Get the Message content, of a deleted Message, by the ID.- Parameters:
id
- the ID of the Message.- Returns:
- the
Message
Entity of the deleted Message.
-
isTemporalVoicechannel
public static boolean isTemporalVoicechannel(net.dv8tion.jda.api.entities.channel.middleman.AudioChannel channel) Check if the channel is a temporal Voice-channel.- Parameters:
channel
- the Voice-channel to check.- Returns:
- true if the channel is a temporal Voice-channel.
-