Skip to content

Commit 3469a51

Browse files
committed
Changed default style
1 parent 2440852 commit 3469a51

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ class MySource(menus.ListPageSource):
115115
return '\n'.join(f'{i}. {v}' for i, v in enumerate(entries, start=offset))
116116

117117
# somewhere else:
118-
pages = menus.MenuPages(source=MySource(range(1, 100)))
118+
pages = menus.MenuPages(source=MySource(range(1, 100)), clear_reactions_after=True)
119119
await pages.start(ctx)
120120
```
121121

@@ -220,10 +220,12 @@ A `ButtonMenuPages` class is provided for pagination with button components.
220220

221221
`ButtonMenuPages` works the same way as the `MenuPages` class found above, but with button components instead of reactions.
222222

223+
A `ButtonStyle` can optionally be passed in to customize the appearance.
224+
223225
`MySource` is the same as defined above, but the menu is instantiated with:
224226

225227
```py
226-
pages = menus.ButtonMenuPages(source=MySource(range(1, 100)), clear_reactions_after=True)
228+
pages = menus.ButtonMenuPages(source=MySource(range(1, 100)), style=nextcord.ButtonStyle.primary)
227229
await pages.start(ctx)
228230
```
229231

nextcord/ext/menus/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1138,7 +1138,7 @@ class ButtonMenuPages(MenuPagesBase):
11381138
The current page that we are in. Zero-indexed
11391139
between [0, :attr:`PageSource.max_pages`).
11401140
"""
1141-
def __init__(self, source: PageSource, style: nextcord.ButtonStyle = nextcord.ButtonStyle.primary, **kwargs):
1141+
def __init__(self, source: PageSource, style: nextcord.ButtonStyle = nextcord.ButtonStyle.secondary, **kwargs):
11421142
super().__init__(source, **kwargs)
11431143
# add buttons to the view
11441144
for emoji in (self.FIRST_PAGE, self.PREVIOUS_PAGE, self.NEXT_PAGE, self.LAST_PAGE, self.STOP):

0 commit comments

Comments
 (0)