random chat messages read for more info #1959
-
is there a way to randomize chat messages so like when my bot says hi i have two messages
or
|
Beta Was this translation helpful? Give feedback.
Answered by
aesthetic0001
Jun 3, 2021
Replies: 1 comment 3 replies
-
Elaborate. Do you mean two possible formats that it may use to respond? if that's the case, I guess a way could be to store them in a constant array with (possibly an object) info on where the username should be inserted and what the chat message is, then just use Math.floor(Math.random * arrayName.length - 1) to get a random index when u want to send a message and then send that message with the given info from the object u got from the index of |
Beta Was this translation helpful? Give feedback.
3 replies
Answer selected by
tk746
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Elaborate. Do you mean two possible formats that it may use to respond? if that's the case, I guess a way could be to store them in a constant array with (possibly an object) info on where the username should be inserted and what the chat message is, then just use
to get a random index when u want to send a message and then send that message with the given info from the object u got from the index of
arrayName
Hope this makes sense xD