pylav.extension.red.ui.sources package#
Submodules#
pylav.extension.red.ui.sources.equalizer module#
- class pylav.extension.red.ui.sources.equalizer.EQPresetsSource(cog, pages, per_page=10)[source]#
Bases:
ListPageSource
- async format_page(menu, page)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
pylav.extension.red.ui.sources.generic module#
- class pylav.extension.red.ui.sources.generic.EntryPickerSource(guild_id, cog, pages, message_str, per_page=25)[source]#
Bases:
ListPageSource
- async format_page(menu, entry)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
- class pylav.extension.red.ui.sources.generic.ListSource(cog, title, pages, per_page=10)[source]#
Bases:
ListPageSource
- async format_page(menu, page)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
- class pylav.extension.red.ui.sources.generic.PreformattedSource(pages)[source]#
Bases:
ListPageSource
- async format_page(menu, page)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
pylav.extension.red.ui.sources.nodes module#
- class pylav.extension.red.ui.sources.nodes.NodeListSource(cog, pages)[source]#
Bases:
ListPageSource
- async format_page(menu, node)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
- class pylav.extension.red.ui.sources.nodes.NodeManageSource(cog)[source]#
Bases:
ListPageSource
- property entries#
- async format_page(menu, node)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
- async get_page(page_number)[source]#
Returns either a single element of the sequence or a slice of the sequence.
If
per_page
is set to1
then this returns a single element. Otherwise it returns at mostper_page
elements.- Returns:
The data returned.
- Return type:
Node
- target#
- class pylav.extension.red.ui.sources.nodes.NodePickerSource(guild_id, cog, pages, message_str)[source]#
Bases:
ListPageSource
- async format_page(menu, nodes)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
pylav.extension.red.ui.sources.player module#
- class pylav.extension.red.ui.sources.player.PlayersSource(cog, specified_guild=None)[source]#
Bases:
ListPageSource
- property entries#
- async format_page(menu, player)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
pylav.extension.red.ui.sources.playlist module#
- class pylav.extension.red.ui.sources.playlist.PlaylistListSource(cog, pages)[source]#
Bases:
ListPageSource
- async format_page(menu, playlists)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
- class pylav.extension.red.ui.sources.playlist.PlaylistPickerSource(guild_id, cog, pages, message_str)[source]#
Bases:
ListPageSource
- async format_page(menu, playlists)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
- class pylav.extension.red.ui.sources.playlist.TrackMappingSource(guild_id, cog, playlist, author, entries, per_page=10)[source]#
Bases:
ListPageSource
- async format_page(menu, tracks)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
pylav.extension.red.ui.sources.queue module#
- class pylav.extension.red.ui.sources.queue.QueuePickerSource(guild_id, cog)[source]#
Bases:
QueueSource
- async format_page(menu, tracks)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
- class pylav.extension.red.ui.sources.queue.QueueSource(guild_id, cog, history=False)[source]#
Bases:
ListPageSource
- property entries#
- async format_page(menu, tracks)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]
- class pylav.extension.red.ui.sources.queue.SearchPickerSource(entries, cog, per_page=10)[source]#
Bases:
ListPageSource
- entries#
- async format_page(menu, entries)[source]#
-
An abstract method to format the page.
This method must return one of the following types.
If this method returns a
str
then it is interpreted as returning thecontent
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
discord.Embed
then it is interpreted as returning theembed
keyword argument indiscord.Message.edit()
anddiscord.abc.Messageable.send()
.If this method returns a
dict
then it is interpreted as the keyword-arguments that are used in bothdiscord.Message.edit()
anddiscord.abc.Messageable.send()
. The two of interest areembed
andcontent
.- Parameters:
menu (
Menu
) – The menu that wants to format this page.page (
Any
) – The page returned byPageSource.get_page()
.
- Returns:
See above.
- Return type:
Union[:class:`str`
,discord.Embed
,dict
]