Skip to main content

Choose Item

This command chooses an item from the ones provided.

Trigger

Type: Command
Trigger: choose

Usage

  • -choose <...items> - Choose an item from the ones provided. If an item has spaces in it, put quotes around it.

Example

-choose "go to sleep" eat "watch tv"

Would result in one of go to sleep, eat, or watch tv.

Code

{{/*
Chooses an item from the ones provided.
See <https://yagpdb-cc.github.io/fun/choose> for more information.

Author: jo3-l <https://github.com/jo3-l>
*/}}

{{ if .CmdArgs }}
{{ .User.Mention }}, I choose **{{ index .CmdArgs (randInt (len .CmdArgs)) }}**!
{{ else }}
Please provide some items for me to choose: for example, `-choose "go to sleep" "stay awake" no`.
{{ end }}

Author

This custom command was written by @jo3-l.