detritus

Utils.Experimentsnamespace

The Utils.Experiments namespace of detritus-client.

On this page
import { Utils } from 'detritus-client';

Utils.Experiments;
3 interfaces · 6 functions

Interfaces

Object shapes for options, payloads and events.

Functions

Standalone helpers.

find()

function src/utils/experiments.ts:142
function find(rows: any[][] | undefined, name: string): any[] | null

Finds an experiment by its name in the assignments or guild_experiments rows from rest.fetchExperiments()

hash()

function src/utils/experiments.ts:92
function hash(name: string): number

The hash discord identifies an experiment by, from its name (like 2022-07_voice_in_threads)

murmurHash3()

function src/utils/experiments.ts:48
function murmurHash3(text: string, seed?: number): number

MurmurHash3 (32 bit) of the utf-8 text, what discord hashes experiment names (and name:id for rollouts) with

text
string
seed?
number
Default 0

position()

function src/utils/experiments.ts:101
function position(key: string, id: string): number

Where a guild (or user) lands in an experiment's rollout, out of 10000 key is the experiment's name, or its hashKey if it has one