Reputation: 1
So, i am trying to make an afk system on my Discord Bot. It have to put [AFK] near the nick of a user (es. [AFK] ohsavee), and if someone ping the user that is afk the bot have to say "@ohSavee is afk". I am having problems with it, can someone help me maybe sending the code?
Upvotes: 0
Views: 148
Reputation: 158
A good example is using a database and storing their AFK reason. So when someone is AFK, it checks their reason in that database.
Or you could use an HashMap<Long, String> (Long = Their UserID, String = Their reason). If they are in the HashMap, you get the String by getting it from their user ID.
Upvotes: 1