Pick an a random given argument devided by "|"

I’m currently working on a discord bot made in JavaScript and saw on some other servers a bot that can pick a random given argument. It looked like this “(prefix)random (argument1) | argument(2) | (argument3), etc” and the bot will pick a random given argument and say that it chat. Like: “I choose argument 3”. I was wondering how I could make something similar to this. I hope someone can help me out.