Pagination in Inventor

{author.name} Avatar Zammer · 3 min read

How to use our pagination system with any database on your own bot!

1. Installation

2. Configuration

  • In both flows, change the database and filter column information in the Get Rows by Values block.
  • Update the Row Content to use any information you like.

NOTE

The very end of the Row Content should be the value to sort the columns by. You can insert it normally, like in this example:

[[ display_column ]] • [[ sort_column ]]

Appears as: Display Column! • 123

Or if you would like to put the sort column elsewhere (or make it invisible) you can add SORT:[value]

[[ display_column ]] SORT:[[ sort_column ]]

Appears as: Display Column!

TIP

To include a prefix like "1st" or "1" based on the sort order, use the following syntax:

{index} - [[ display_column ]] SORT:[[ sort_column ]]

Appears as: 1 - Display Column!

{indexO} - [[ display_column ]] SORT:[[ sort_column ]]

Appears as: 1st - Display Column!

3. Run the Command

Run the slash command and it should create configuration global variables. The command should return a link to edit those variables.

  • pagination.embed_title

    Sets the title of the embed message

    Default: Example Title

  • pagination.embed_color

    Hex color of the embed message.

    Default: FDBD24

  • pagination.embed_footer

    Footer of the embed. You can use the following variables:

    • {min} - The index of the first item on the current page
    • {max} - The index of the last item on the current page
    • {total} - The total count of items that matched the filters (across all pages)
    • {currentpage} - The current page number
    • {lastpage} - The page number of the last page of items.

    Default: Showing {min}-{max} of {total} • Page {currentpage}/{lastpage}

  • pagination.items_per_page

    How many items to show on each page.

    Default: 10

  • pagination.is_ephemeral

    Whether or not the pagination message should be ephemeral.

    Default: true

  • pagination.sort_order

    What order to sort the items in. Must be Ascending or Descending.

    Default: Descending

  • pagination.wrong_user_msg

    The message that is sent when someone tries to change the page on someone else's message.

    Default: You can't change the pages on someone else's message!

  • pagination.no_rows

    The message that is sent when there are no rows that match the filters.

    Default: Oops! There's nothing to show!

  • pagination.invalid_page

    The message that shows when a page is invalid.

    Default: Hmm I didn't find anything... maybe try a different page?

  • pagination.show_server_profile

    Whether or not to show the server name and icon in the embed. Must be true or false.

    Default: true

Click the link sent in the message to go to the Global Variables page and edit these variables. Once you're satisfied, you can test it out by running the command again. Adjust the variables and row content until you're content, and then you're finished!

Happy inventing!

Questions? Bug Reports? Feature Suggestions?

Join our Discord server!

Avatar of Zammer

Zammer

1 Guide

Always taking on ambitious projects that'll never be finished. Inventor in Inventor eventuall...

Tags

April 1, 2025

April 20, 2025