discord-interactive


Namediscord-interactive JSON
Version 4.1.0 PyPI version JSON
download
home_pagehttps://github.com/astariul/discord_interactive_help
SummaryA package allowing you to display interactive help in Discord easily
upload_time2023-08-05 17:51:33
maintainer
docs_urlNone
authorNicolas REMOND
requires_python>=3.8
licenseMIT
keywords discord interactive help
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            <h1 align="center">Discord Interactive Help</h1>

![gif](https://user-images.githubusercontent.com/22237185/53283254-da5a3100-3786-11e9-95cd-cd4dd4859bd2.gif)

<p align="center">
A Discord python framework to display an interactive help easily.
</p>

<p align="center">
    <a href="https://github.com/astariul/discord_interactive_help/releases"><img src="https://img.shields.io/github/release/astariul/discord_interactive_help.svg" alt="GitHub release" /></a>
    <a href="https://github.com/astariul/discord_interactive_help/actions/workflows/lint.yaml"><img src="https://github.com/astariul/discord_interactive_help/actions/workflows/lint.yaml/badge.svg" alt="Lint status" /></a>
    <a href="https://astariul.github.io/discord_interactive_help"><img src="https://img.shields.io/website?down_message=failing&label=docs&up_color=green&up_message=passing&url=https%3A%2F%2Fastariul.github.io%2Fdiscord_interactive_help" alt="Docs" /></a>
    <a href="https://github.com/astariul/pytere/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-yellow.svg" alt="licence" /></a>
</p>

<p align="center">
  <a href="#features">Features</a> •
  <a href="#usage">Usage</a> •
  <a href="#example">Example</a> •
  <a href="#advanced">Advanced</a>
  <a href="#running-in-docker">Running in Docker</a> •
  <a href="#notes">Notes</a>
  <br>
  <a href="https://astariul.github.io/discord_interactive_help/" target="_blank">Documentation</a>
</p>

<h2 align="center">Features</h2>

* 🔆 **Easy to naviguate** : Use reactions to naviguate through the Help manual.
* ⚙ **Customized reaction** : Use any emoji as naviguation icon.
* 🎮 **Commands support** : Go even further with interactive commands.

<h2 align="center">Usage</h2>

Install the package :

`pip install discord-interactive`

---

Import the `Page` and `Help` objects into your bot's code, and create your own help manual :

```py
from discord_interactive import Page, Help

# Define each page
root = Page('Welcome !\n')
page_1 = Page('This is page 1')
page_2 = Page('This is page 2')

# Link pages together
page_1.link(page_2, description='Click this icon to access page 2', reaction='💩')
root.link(page_1, description='Click this icon to access page 1')

# Set the root page as the root of other page (so user can come back with a specific reaction)
root.root_of([page_1, page_2])

# Create the Help object
client = discord.Client()
h = Help(client, root)

...

# And display the help !
@client.event
async def on_message(message):
    if message.author != client.user:  # Do not answer to myself
        if message.content.startswith('/help'):
            await h.display(message.author)
```

<h2 align="center">Example</h2>

You can try the interactive help in [this Discord server](https://discord.gg/cH6hUbw) !

Simply join the server, and type `/help` in the chat.

Also, take a look at the code for this interactive help ! Check out the script [`main.py`](https://github.com/astariul/discord_interactive_help/blob/main/main.py).

<h2 align="center">Advanced</h2>

If you are interested in **advanced usage** such as **interactive commands**, take a look at the [full documentation](https://astariul.github.io/discord_interactive_help/4.0/usage/#advanced).

Example of advanced usage :

![gif](https://user-images.githubusercontent.com/22237185/53492662-c4c56e00-3adc-11e9-8be8-1b10d9f85e8a.gif)

---

If you can't find what you are looking for, or need help about this library, you can open a [discussion thread](https://github.com/astariul/discord_interactive_help/discussions) or an [issue](https://github.com/astariul/discord_interactive_help/issues), we will be glad to help !

<h2 align="center">Running in Docker</h2>

A Dockerfile is available to run the example easily. Just build the image :

```
docker build -t discord_interactive_help .
```

And then start it with your Discord bot token :

```
DISCORD_BOT_SECRET="<your_token>" docker run -e DISCORD_BOT_SECRET discord_interactive_help
```

<h2 align="center">Notes</h2>

* *This idea was already known for some time, I didn't get the idea myself. I just wanted to share an easy framework to implement it for your own bot.*

* *This is working only with the Python Discord API.*



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/astariul/discord_interactive_help",
    "name": "discord-interactive",
    "maintainer": "",
    "docs_url": null,
    "requires_python": ">=3.8",
    "maintainer_email": "",
    "keywords": "Discord,Interactive,Help",
    "author": "Nicolas REMOND",
    "author_email": "remondnicola@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/64/02/5d2d3a8ededbb4768e70483b395e98d267b4909bc7a088989001e4ceb907/discord_interactive-4.1.0.tar.gz",
    "platform": null,
    "description": "<h1 align=\"center\">Discord Interactive Help</h1>\n\n![gif](https://user-images.githubusercontent.com/22237185/53283254-da5a3100-3786-11e9-95cd-cd4dd4859bd2.gif)\n\n<p align=\"center\">\nA Discord python framework to display an interactive help easily.\n</p>\n\n<p align=\"center\">\n    <a href=\"https://github.com/astariul/discord_interactive_help/releases\"><img src=\"https://img.shields.io/github/release/astariul/discord_interactive_help.svg\" alt=\"GitHub release\" /></a>\n    <a href=\"https://github.com/astariul/discord_interactive_help/actions/workflows/lint.yaml\"><img src=\"https://github.com/astariul/discord_interactive_help/actions/workflows/lint.yaml/badge.svg\" alt=\"Lint status\" /></a>\n    <a href=\"https://astariul.github.io/discord_interactive_help\"><img src=\"https://img.shields.io/website?down_message=failing&label=docs&up_color=green&up_message=passing&url=https%3A%2F%2Fastariul.github.io%2Fdiscord_interactive_help\" alt=\"Docs\" /></a>\n    <a href=\"https://github.com/astariul/pytere/blob/main/LICENSE\"><img src=\"https://img.shields.io/badge/License-MIT-yellow.svg\" alt=\"licence\" /></a>\n</p>\n\n<p align=\"center\">\n  <a href=\"#features\">Features</a> \u2022\n  <a href=\"#usage\">Usage</a> \u2022\n  <a href=\"#example\">Example</a> \u2022\n  <a href=\"#advanced\">Advanced</a>\n  <a href=\"#running-in-docker\">Running in Docker</a> \u2022\n  <a href=\"#notes\">Notes</a>\n  <br>\n  <a href=\"https://astariul.github.io/discord_interactive_help/\" target=\"_blank\">Documentation</a>\n</p>\n\n<h2 align=\"center\">Features</h2>\n\n* \ud83d\udd06 **Easy to naviguate** : Use reactions to naviguate through the Help manual.\n* \u2699 **Customized reaction** : Use any emoji as naviguation icon.\n* \ud83c\udfae **Commands support** : Go even further with interactive commands.\n\n<h2 align=\"center\">Usage</h2>\n\nInstall the package :\n\n`pip install discord-interactive`\n\n---\n\nImport the `Page` and `Help` objects into your bot's code, and create your own help manual :\n\n```py\nfrom discord_interactive import Page, Help\n\n# Define each page\nroot = Page('Welcome !\\n')\npage_1 = Page('This is page 1')\npage_2 = Page('This is page 2')\n\n# Link pages together\npage_1.link(page_2, description='Click this icon to access page 2', reaction='\ud83d\udca9')\nroot.link(page_1, description='Click this icon to access page 1')\n\n# Set the root page as the root of other page (so user can come back with a specific reaction)\nroot.root_of([page_1, page_2])\n\n# Create the Help object\nclient = discord.Client()\nh = Help(client, root)\n\n...\n\n# And display the help !\n@client.event\nasync def on_message(message):\n    if message.author != client.user:  # Do not answer to myself\n        if message.content.startswith('/help'):\n            await h.display(message.author)\n```\n\n<h2 align=\"center\">Example</h2>\n\nYou can try the interactive help in [this Discord server](https://discord.gg/cH6hUbw) !\n\nSimply join the server, and type `/help` in the chat.\n\nAlso, take a look at the code for this interactive help ! Check out the script [`main.py`](https://github.com/astariul/discord_interactive_help/blob/main/main.py).\n\n<h2 align=\"center\">Advanced</h2>\n\nIf you are interested in **advanced usage** such as **interactive commands**, take a look at the [full documentation](https://astariul.github.io/discord_interactive_help/4.0/usage/#advanced).\n\nExample of advanced usage :\n\n![gif](https://user-images.githubusercontent.com/22237185/53492662-c4c56e00-3adc-11e9-8be8-1b10d9f85e8a.gif)\n\n---\n\nIf you can't find what you are looking for, or need help about this library, you can open a [discussion thread](https://github.com/astariul/discord_interactive_help/discussions) or an [issue](https://github.com/astariul/discord_interactive_help/issues), we will be glad to help !\n\n<h2 align=\"center\">Running in Docker</h2>\n\nA Dockerfile is available to run the example easily. Just build the image :\n\n```\ndocker build -t discord_interactive_help .\n```\n\nAnd then start it with your Discord bot token :\n\n```\nDISCORD_BOT_SECRET=\"<your_token>\" docker run -e DISCORD_BOT_SECRET discord_interactive_help\n```\n\n<h2 align=\"center\">Notes</h2>\n\n* *This idea was already known for some time, I didn't get the idea myself. I just wanted to share an easy framework to implement it for your own bot.*\n\n* *This is working only with the Python Discord API.*\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A package allowing you to display interactive help in Discord easily",
    "version": "4.1.0",
    "project_urls": {
        "Homepage": "https://github.com/astariul/discord_interactive_help"
    },
    "split_keywords": [
        "discord",
        "interactive",
        "help"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "ab0dd7fbb4e0e47095bb4716c0fe679ebed76f960b8346f5d28f04eae96102bc",
                "md5": "159d1b1db2fa1f2727bd42b10bf72c69",
                "sha256": "0804908fcca05ea3fb1afbf76c497186579dbdcf3dd60b14c253d3b408967777"
            },
            "downloads": -1,
            "filename": "discord_interactive-4.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "159d1b1db2fa1f2727bd42b10bf72c69",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": ">=3.8",
            "size": 11204,
            "upload_time": "2023-08-05T17:51:32",
            "upload_time_iso_8601": "2023-08-05T17:51:32.042677Z",
            "url": "https://files.pythonhosted.org/packages/ab/0d/d7fbb4e0e47095bb4716c0fe679ebed76f960b8346f5d28f04eae96102bc/discord_interactive-4.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "64025d2d3a8ededbb4768e70483b395e98d267b4909bc7a088989001e4ceb907",
                "md5": "e6c6a4ebd5b0fc78d327c762d1539637",
                "sha256": "bc661c259ecef29db73077e1b5b2a6da5651b839e4026cf010df2f3eca9a8cbb"
            },
            "downloads": -1,
            "filename": "discord_interactive-4.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "e6c6a4ebd5b0fc78d327c762d1539637",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": ">=3.8",
            "size": 12085,
            "upload_time": "2023-08-05T17:51:33",
            "upload_time_iso_8601": "2023-08-05T17:51:33.613190Z",
            "url": "https://files.pythonhosted.org/packages/64/02/5d2d3a8ededbb4768e70483b395e98d267b4909bc7a088989001e4ceb907/discord_interactive-4.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2023-08-05 17:51:33",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "astariul",
    "github_project": "discord_interactive_help",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "lcname": "discord-interactive"
}
        
Elapsed time: 0.87492s