ohSavee
ohSavee

Reputation: 1

AFK command discord (JDA)

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

Answers (1)

Codixer
Codixer

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

Related Questions