Get Random Row by Value

Get a random row from a database within a search value in a column.

If you are unsure how to use Databases, we have a tutorial that goes over them here.

What does it do?

The Get Random Row by Value block allows you to retrieve a random row from a database filtered by a specified column value. Example of Get Random Row by Value Block


Inputs

Database Required

Provide the name of the database to use for this block.

The database must exist on the current bot.

Example: my_database

Column Required

The column to search for a row by.

Provide the name of a column in the selected database.

Make sure that the column exists in the selected database.

Example: my_column

Value

Provide a value to look up in the selected database/column.

Example: Example value!

Outputs

Row ID

The Row ID of the random row, blank if no row could be retrieved.

Example: abcdef12-3456-7890-abcd-ef1234567890

Created At (Unix)

The Unix timestamp of when the row was created.

Example: 1731886315

Updated At (Unix)

The Unix timestamp of the last time the row was updated.

Example: 1731886315