pygicord


Namepygicord JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/davidetacchini/pygicord
SummaryAn easy-to-use pagination wrapper for discord.py
upload_time2021-06-11 08:30:40
maintainer
docs_urlNone
authorDavide Tacchini
requires_python
licenseMIT
keywords discord.py paginator
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Pygicord
An easy-to-use pagination wrapper for discord.py

<a href="https://github.com/davidetacchini/pygicord/actions" traget="_blank">
	<img src="https://github.com/davidetacchini/pygicord/workflows/Lint/badge.svg" alt="Lint">
</a>
<a href="https://github.com/davidetacchini/pygicord/actions" traget="_blank">
	<img src="https://github.com/davidetacchini/pygicord/workflows/Deploy/badge.svg" alt="Deploy">
</a>
<a href="https://pypi.org/project/pygicord" traget="_blank">
   <img alt="PyPI - Python Version" src="https://img.shields.io/pypi/pyversions/pygicord"> 
</a>
<a href="https://pypi.org/project/pygicord" traget="_blank">
    <img alt="PyPI - Version" src="https://img.shields.io/pypi/v/pygicord">
</a>
<a href="https://pepy.tech/project/pygicord" traget="_blank">
	<img alt="PePy - Downloads" src="https://pepy.tech/badge/pygicord">
</a>

## Notes

* Make sure your bot has `Manage Messages` permission to take full advantage from the paginator.
* It is recommended using the latest stable version of <a href="https://discordpy.readthedocs.io/en/stable/">discord.py</a>.

## Installing

```shell
pip install pygicord
```

or via git: to download the latest version available (if not deployed already).

```shell
pip install git+https://github.com/davidetacchini/pygicord
```

## Basic example

```py
import discord
from discord.ext import commands

from pygicord import Paginator


bot = commands.Bot(command_prefix=".")


def get_pages():
    pages = []
    # Generate a list of 5 embeds
    for i in range(1, 6):
        embed = discord.Embed()
        embed.title = f"I'm the embed {i}!"
        pages.append(embed)
    return pages


@bot.command()
async def test(ctx):
    paginator = Paginator(pages=get_pages())
    await paginator.start(ctx)


@bot.event
async def on_ready():
    print("I'm ready!")


bot.run("token")
```

## Attributes
| Name      | Description                                                                      | Type                               | Default |
| --------- | -------------------------------------------------------------------------------- | ---------------------------------- | ------- |
| pages     | A list of embeds to paginate or an embed instance. 					           | List[discord.Embed], discord.Embed | None    |
| timeout   | The timeout to wait before stopping the paginator session.                       | float                              | 90.0    |
| compact   | Whether to use three reactions: previous, stop and next.  					   | bool                               | False   |
| has_input | Whether to add a reaction to enter a page number to go to.            	       | bool                               | True    |
| has_lock  | Whether to add a reaction to lock/unlock the session to other members.       	   | bool                               | False   |



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/davidetacchini/pygicord",
    "name": "pygicord",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "discord.py,paginator",
    "author": "Davide Tacchini",
    "author_email": "",
    "download_url": "https://files.pythonhosted.org/packages/87/86/d1aa320d7c2f3585682f592d48704c7e66055e27b102cdd2d1478c3e575a/pygicord-0.5.0.tar.gz",
    "platform": "",
    "description": "# Pygicord\nAn easy-to-use pagination wrapper for discord.py\n\n<a href=\"https://github.com/davidetacchini/pygicord/actions\" traget=\"_blank\">\n\t<img src=\"https://github.com/davidetacchini/pygicord/workflows/Lint/badge.svg\" alt=\"Lint\">\n</a>\n<a href=\"https://github.com/davidetacchini/pygicord/actions\" traget=\"_blank\">\n\t<img src=\"https://github.com/davidetacchini/pygicord/workflows/Deploy/badge.svg\" alt=\"Deploy\">\n</a>\n<a href=\"https://pypi.org/project/pygicord\" traget=\"_blank\">\n   <img alt=\"PyPI - Python Version\" src=\"https://img.shields.io/pypi/pyversions/pygicord\"> \n</a>\n<a href=\"https://pypi.org/project/pygicord\" traget=\"_blank\">\n    <img alt=\"PyPI - Version\" src=\"https://img.shields.io/pypi/v/pygicord\">\n</a>\n<a href=\"https://pepy.tech/project/pygicord\" traget=\"_blank\">\n\t<img alt=\"PePy - Downloads\" src=\"https://pepy.tech/badge/pygicord\">\n</a>\n\n## Notes\n\n* Make sure your bot has `Manage Messages` permission to take full advantage from the paginator.\n* It is recommended using the latest stable version of <a href=\"https://discordpy.readthedocs.io/en/stable/\">discord.py</a>.\n\n## Installing\n\n```shell\npip install pygicord\n```\n\nor via git: to download the latest version available (if not deployed already).\n\n```shell\npip install git+https://github.com/davidetacchini/pygicord\n```\n\n## Basic example\n\n```py\nimport discord\nfrom discord.ext import commands\n\nfrom pygicord import Paginator\n\n\nbot = commands.Bot(command_prefix=\".\")\n\n\ndef get_pages():\n    pages = []\n    # Generate a list of 5 embeds\n    for i in range(1, 6):\n        embed = discord.Embed()\n        embed.title = f\"I'm the embed {i}!\"\n        pages.append(embed)\n    return pages\n\n\n@bot.command()\nasync def test(ctx):\n    paginator = Paginator(pages=get_pages())\n    await paginator.start(ctx)\n\n\n@bot.event\nasync def on_ready():\n    print(\"I'm ready!\")\n\n\nbot.run(\"token\")\n```\n\n## Attributes\n| Name      | Description                                                                      | Type                               | Default |\n| --------- | -------------------------------------------------------------------------------- | ---------------------------------- | ------- |\n| pages     | A list of embeds to paginate or an embed instance. \t\t\t\t\t           | List[discord.Embed], discord.Embed | None    |\n| timeout   | The timeout to wait before stopping the paginator session.                       | float                              | 90.0    |\n| compact   | Whether to use three reactions: previous, stop and next.  \t\t\t\t\t   | bool                               | False   |\n| has_input | Whether to add a reaction to enter a page number to go to.            \t       | bool                               | True    |\n| has_lock  | Whether to add a reaction to lock/unlock the session to other members.       \t   | bool                               | False   |\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "An easy-to-use pagination wrapper for discord.py",
    "version": "0.5.0",
    "split_keywords": [
        "discord.py",
        "paginator"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "f737208f23d4e62338b48624575fd645",
                "sha256": "2c76f60ff3f17dd2d25f848adfe29bad44b982b1ef4f4ccbc640219947d02ca3"
            },
            "downloads": -1,
            "filename": "pygicord-0.5.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "f737208f23d4e62338b48624575fd645",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 5452,
            "upload_time": "2021-06-11T08:30:38",
            "upload_time_iso_8601": "2021-06-11T08:30:38.804283Z",
            "url": "https://files.pythonhosted.org/packages/33/95/44d2a8dec794383ccf85171ba63884301667263b577683b07f1cce276d4c/pygicord-0.5.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "4dccdcff2fc59cbe1735cf3d0f3cf202",
                "sha256": "0dabe6dbd53e97cfe6c021b9c6acd4780b0de82c77fce581803cec7ff3199e7b"
            },
            "downloads": -1,
            "filename": "pygicord-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "4dccdcff2fc59cbe1735cf3d0f3cf202",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 5512,
            "upload_time": "2021-06-11T08:30:40",
            "upload_time_iso_8601": "2021-06-11T08:30:40.233130Z",
            "url": "https://files.pythonhosted.org/packages/87/86/d1aa320d7c2f3585682f592d48704c7e66055e27b102cdd2d1478c3e575a/pygicord-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2021-06-11 08:30:40",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": null,
    "github_project": "davidetacchini",
    "error": "Could not fetch GitHub repository",
    "lcname": "pygicord"
}
        
Elapsed time: 0.30399s