Name | markination JSON |
Version |
0.2.3
JSON |
| download |
home_page | |
Summary | A discord paginator. |
upload_time | 2023-09-04 08:34:13 |
maintainer | |
docs_url | None |
author | Mark |
requires_python | >=3.11,<4.0 |
license | |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Markination
[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)
Markination is a versatile Python package that provides an easy-to-use Discord message paginator using the discord.py library.
## Features
- Discord Button Paginator
- Discord Dropdown Paginator
- Built-in support for navigation buttons (Next, Previous, First, Last).
- Designed for ease of use in your Discord bot projects.
- Extensible and open-source.
## Installation
[![License](https://media.discordapp.net/attachments/1093865249645547570/1147899684996780112/LibraryRequiresDiscordpy.png)](https://github.com/rapptz/discord.py)
You can install Markination using [Poetry](https://python-poetry.org/) and [PyPi](https://pypi.org/project/markination/)
```shell
poetry add markination
```
```python
pip install markination
```
## Usage
Simple Button Setup:
```python
from markination import ButtonPaginator
from discord.ext import commands
import discord
@bot.command()
async def paginator(ctx: commands.Context):
# A list of embeds to paginate
embeds = [discord.Embed(title="First embed"),
discord.Embed(title="Second embed"),
discord.Embed(title="Third embed")]
# Start the paginator
await ButtonPaginator.Simple().start(ctx, pages=embeds)
```
Custom Buttons:
```python
from markination import ButtonPaginator
from discord.ext import commands
import discord
from discord import ui
@bot.command()
async def paginator(ctx: commands.Context):
embeds = [discord.Embed(title="First embed"),
discord.Embed(title="Second embed"),
discord.Embed(title="Third embed")]
PreviousButton = discord.ui.Button(label=f"Previous")
NextButton = discord.ui.Button(label=f"Next")
FirstPageButton = discord.ui.Button(label=f"First Page")
LastPageButton = discord.ui.Button(label=f"Last page")
PageCounterStyle = discord.ButtonStyle.danger # Only accepts ButtonStyle instead of Button
InitialPage = 0 # Page to start the paginator on.
timeout = 0 # Seconds to timeout. Default is 60
ephemeral = bool # Defaults to false if not passed in.
await ButtonPaginator.Simple(
PreviousButton=PreviousButton,
NextButton=NextButton,
FirstEmbedButton=FirstPageButton,
LastEmbedButton=LastPageButton,
PageCounterStyle=PageCounterStyle,
InitialPage=InitialPage,
timeout=timeout, ephemeral=ephemeral).start(ctx, pages=embeds)
```
Simple Dropdown Setup
```python
from markination import DropdownPaginator
from discord.ext import commands
import discord
from discord import ui
@bot.command()
async def dropdown(ctx):
pages = [
discord.Embed(title="Page 1", description="This is the first page."),
discord.Embed(title="Page 2", description="This is the second page."),
discord.Embed(title="Page 3", description="This is the third page.")
]
await DropdownPaginator.Simple(ctx, pages, timeout=60).start(ctx)
```
Pull Requests are always open!
Raw data
{
"_id": null,
"home_page": "",
"name": "markination",
"maintainer": "",
"docs_url": null,
"requires_python": ">=3.11,<4.0",
"maintainer_email": "",
"keywords": "",
"author": "Mark",
"author_email": "mark@blerp.co.uk",
"download_url": "https://files.pythonhosted.org/packages/1e/2e/acc3e05df56dd715feb4bbc9963dcc7d7824bad01b25a65076343e2b5541/markination-0.2.3.tar.gz",
"platform": null,
"description": "# Markination\n\n[![License](https://img.shields.io/badge/License-MIT-blue.svg)](https://opensource.org/licenses/MIT)\n\nMarkination is a versatile Python package that provides an easy-to-use Discord message paginator using the discord.py library.\n\n## Features\n\n- Discord Button Paginator\n- Discord Dropdown Paginator\n- Built-in support for navigation buttons (Next, Previous, First, Last).\n- Designed for ease of use in your Discord bot projects.\n- Extensible and open-source.\n\n## Installation\n\n[![License](https://media.discordapp.net/attachments/1093865249645547570/1147899684996780112/LibraryRequiresDiscordpy.png)](https://github.com/rapptz/discord.py)\n\n\nYou can install Markination using [Poetry](https://python-poetry.org/) and [PyPi](https://pypi.org/project/markination/)\n\n```shell\npoetry add markination\n```\n\n```python\npip install markination\n```\n\n## Usage\n\nSimple Button Setup:\n```python\nfrom markination import ButtonPaginator\nfrom discord.ext import commands\nimport discord\n\n@bot.command()\nasync def paginator(ctx: commands.Context):\n # A list of embeds to paginate\n embeds = [discord.Embed(title=\"First embed\"), \n discord.Embed(title=\"Second embed\"),\n discord.Embed(title=\"Third embed\")]\n\n # Start the paginator\n await ButtonPaginator.Simple().start(ctx, pages=embeds)\n```\n\nCustom Buttons:\n```python\nfrom markination import ButtonPaginator\nfrom discord.ext import commands\nimport discord\nfrom discord import ui\n\n@bot.command()\nasync def paginator(ctx: commands.Context):\n embeds = [discord.Embed(title=\"First embed\"), \n discord.Embed(title=\"Second embed\"),\n discord.Embed(title=\"Third embed\")]\n PreviousButton = discord.ui.Button(label=f\"Previous\")\n NextButton = discord.ui.Button(label=f\"Next\")\n FirstPageButton = discord.ui.Button(label=f\"First Page\")\n LastPageButton = discord.ui.Button(label=f\"Last page\")\n PageCounterStyle = discord.ButtonStyle.danger # Only accepts ButtonStyle instead of Button\n InitialPage = 0 # Page to start the paginator on.\n timeout = 0 # Seconds to timeout. Default is 60\n ephemeral = bool # Defaults to false if not passed in.\n await ButtonPaginator.Simple(\n PreviousButton=PreviousButton,\n NextButton=NextButton,\n FirstEmbedButton=FirstPageButton,\n LastEmbedButton=LastPageButton,\n PageCounterStyle=PageCounterStyle,\n InitialPage=InitialPage,\n timeout=timeout, ephemeral=ephemeral).start(ctx, pages=embeds)\n```\nSimple Dropdown Setup\n```python\nfrom markination import DropdownPaginator\nfrom discord.ext import commands\nimport discord\nfrom discord import ui\n\n@bot.command()\nasync def dropdown(ctx):\n pages = [\n discord.Embed(title=\"Page 1\", description=\"This is the first page.\"),\n discord.Embed(title=\"Page 2\", description=\"This is the second page.\"),\n discord.Embed(title=\"Page 3\", description=\"This is the third page.\")\n ]\n\n await DropdownPaginator.Simple(ctx, pages, timeout=60).start(ctx)\n\n```\nPull Requests are always open!\n",
"bugtrack_url": null,
"license": "",
"summary": "A discord paginator.",
"version": "0.2.3",
"project_urls": null,
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "a24573a071a7c23dfd9e104088b84e8e33b43f2ac65bcabe8e6372d7a7ba1229",
"md5": "4c31dc07e651e741653eef628ec6f71f",
"sha256": "8beee71787012cbc1ba089324b254e0e9ff7bcaf4c71d600be551c77d95265c7"
},
"downloads": -1,
"filename": "markination-0.2.3-py3-none-any.whl",
"has_sig": false,
"md5_digest": "4c31dc07e651e741653eef628ec6f71f",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11,<4.0",
"size": 4897,
"upload_time": "2023-09-04T08:34:12",
"upload_time_iso_8601": "2023-09-04T08:34:12.135289Z",
"url": "https://files.pythonhosted.org/packages/a2/45/73a071a7c23dfd9e104088b84e8e33b43f2ac65bcabe8e6372d7a7ba1229/markination-0.2.3-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "1e2eacc3e05df56dd715feb4bbc9963dcc7d7824bad01b25a65076343e2b5541",
"md5": "6c7a0b83ec1be4984f688882afddd2a2",
"sha256": "534594593a33c6d4aedd4afb431da1b9935642f0221729076ded5484ea72a9ae"
},
"downloads": -1,
"filename": "markination-0.2.3.tar.gz",
"has_sig": false,
"md5_digest": "6c7a0b83ec1be4984f688882afddd2a2",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11,<4.0",
"size": 3835,
"upload_time": "2023-09-04T08:34:13",
"upload_time_iso_8601": "2023-09-04T08:34:13.594343Z",
"url": "https://files.pythonhosted.org/packages/1e/2e/acc3e05df56dd715feb4bbc9963dcc7d7824bad01b25a65076343e2b5541/markination-0.2.3.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-09-04 08:34:13",
"github": false,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"lcname": "markination"
}