Skip to content

Util.random.index()

github-actions[bot] edited this page Sep 30, 2024 · 2 revisions

randomly chooses an index from an array or object
type: Function

arguments:

  • object Array/Object

util.random.index([ "a", "b", "c" ]); // 2

util.random.index({ key1: "val1", key2: "val2", key3: "val3" }); // 1


πŸ›ˆ Client

πŸ›ˆ AddonService

πŸ›ˆ AttachmentService

πŸ›ˆ ChannelService

πŸ›ˆ CommandService

πŸ›ˆ ComponentService

πŸ›ˆ ErrorService

πŸ›ˆ EventService

πŸ›ˆ ExpressionService

πŸ›ˆ GuildService

πŸ›ˆ LogService

πŸ›ˆ MessageService

πŸ›ˆ PermissionService

πŸ›ˆ RoleService

πŸ›ˆ StorageService

πŸ›ˆ TypeService

πŸ›ˆ UserService

πŸ›ˆ UtilService

πŸ›ˆ VoiceService


Clone this wiki locally