1
- ### discord -ext-menus
1
+ # nextcord -ext-menus
2
2
3
- An experimental extension menu that makes working with reaction menus a bit easier.
3
+ ## About
4
4
5
- ** There are no front-facing docs for this and it's not on PyPI. As this is meant to be a repository for testing **
5
+ A Nextcord extension that makes working with reaction menus a bit easier.
6
6
7
7
## Installing
8
8
9
- Installing is done purely via git:
9
+ Python ** >=3.6.0 ** is required.
10
10
11
- ``` py
12
- python - m pip install - U git + https: // github.com / Rapptz / discord - ext- menus
11
+ ``` py
12
+ pip install -- upgrade nextcord - ext- menus
13
13
```
14
14
15
15
## Getting Started
@@ -19,7 +19,7 @@ To whet your appetite, the following examples show the fundamentals on how to cr
19
19
The first example shows a basic menu that has a stop button and two reply buttons:
20
20
21
21
``` py
22
- from discord .ext import menus
22
+ from nextcord .ext import menus
23
23
24
24
class MyMenu (menus .Menu ):
25
25
async def send_initial_message (self , ctx , channel ):
@@ -52,7 +52,7 @@ If an error happens then an exception of type `menus.MenuError` is raised.
52
52
This second example shows a confirmation menu and how we can compose it and use it later:
53
53
54
54
``` py
55
- from discord .ext import menus
55
+ from nextcord .ext import menus
56
56
57
57
class Confirm (menus .Menu ):
58
58
def __init__ (self , msg ):
@@ -105,7 +105,7 @@ None of these page sources deal with formatting of data, leaving that up to you.
105
105
For the sake of example, here's a basic list source that is paginated:
106
106
107
107
``` py
108
- from discord .ext import menus
108
+ from nextcord .ext import menus
109
109
110
110
class MySource (menus .ListPageSource ):
111
111
def __init__ (self , data ):
@@ -125,7 +125,7 @@ The `format_page` can return either a `str` for content, `discord.Embed` for an
125
125
Some more examples using ` GroupByPageSource ` :
126
126
127
127
``` py
128
- from discord .ext import menus
128
+ from nextcord .ext import menus
129
129
130
130
class Test :
131
131
def __init__ (self , key , value ):
@@ -150,7 +150,7 @@ await pages.start(ctx)
150
150
Another one showing ` AsyncIteratorPageSource ` :
151
151
152
152
``` py
153
- from discord .ext import menus
153
+ from nextcord .ext import menus
154
154
155
155
class Test :
156
156
def __init__ (self , value ):
@@ -174,3 +174,8 @@ class Source(menus.AsyncIteratorPageSource):
174
174
pages = menus.MenuPages(source = Source(), clear_reactions_after = True )
175
175
await pages.start(ctx)
176
176
```
177
+
178
+ ## License
179
+
180
+ Copyright (c) 2021 The Nextcord Developers
181
+ Copyright (c) 2015-2020 Danny Y. (Rapptz)
0 commit comments