@@ -35,11 +35,18 @@ and using the ``send()`` method to send the navigator to a channel, or as a resp
3535 # If the bot is mentioned
3636 if me.id in event.message.user_mentions_ids:
3737 embed = hikari.Embed(title="I'm the second page!", description="Also an embed!")
38+
39+ # A Page object can be used to further customize the page payload if a single embed or str is not enough.
40+ page = nav.Page(content="I'm the last page!", embed=hikari.Embed(title="I also have an embed!"))
41+
3842 # The list of pages this navigator should paginate through
39- pages = ["I'm the first page!", embed, "I'm the last page!"]
43+ # This should be a list that contains 'str', 'hikari.Embed', and 'nav.Page' objects.
44+ pages = ["I'm the first page!", embed, page]
45+
4046 # Define our navigator and pass in our list of pages
4147 navigator = nav.NavigatorView(pages=pages)
42- # You may also pass an interaction object to this function
48+
49+ # You may also pass an interaction or miru context to this function
4350 await navigator.send(event.channel_id)
4451
4552
@@ -97,9 +104,11 @@ You may use any mix of the built-in and custom navigation buttons in your naviga
97104 if me.id in event.message.user_mentions_ids:
98105 embed = hikari.Embed(title="I'm the second page!", description="Also an embed!")
99106 pages = ["I'm a customized navigator!", embed, "I'm the last page!"]
107+
100108 # Define our custom buttons for this navigator, keep in mind the order
101109 # All navigator buttons MUST subclass nav.NavButton
102110 buttons = [nav.PrevButton(), nav.StopButton(), nav.NextButton(), MyNavButton()]
111+
103112 # Pass our list of NavButton to the navigator
104113 navigator = nav.NavigatorView(pages=pages, buttons=buttons)
105114
0 commit comments