{"id":13410738,"url":"https://github.com/ms7m/dispike","last_synced_at":"2026-01-02T00:57:23.825Z","repository":{"id":46248547,"uuid":"323811241","full_name":"ms7m/dispike","owner":"ms7m","description":"An independent, simple to use, powerful framework for creating interaction-based Discord bots. Powered by FastAPI","archived":false,"fork":false,"pushed_at":"2022-09-07T08:00:19.000Z","size":2154,"stargazers_count":37,"open_issues_count":17,"forks_count":5,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-09-15T04:42:09.641Z","etag":null,"topics":["discord","discord-slash-commands","fastapi","python"],"latest_commit_sha":null,"homepage":"https://dispike.ms7m.me/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ms7m.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-12-23T05:29:40.000Z","updated_at":"2024-07-09T04:53:35.000Z","dependencies_parsed_at":"2022-08-27T18:51:28.958Z","dependency_job_id":null,"html_url":"https://github.com/ms7m/dispike","commit_stats":null,"previous_names":[],"tags_count":16,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ms7m%2Fdispike","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ms7m%2Fdispike/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ms7m%2Fdispike/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ms7m%2Fdispike/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ms7m","download_url":"https://codeload.github.com/ms7m/dispike/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243610440,"owners_count":20318961,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["discord","discord-slash-commands","fastapi","python"],"created_at":"2024-07-30T20:01:08.773Z","updated_at":"2026-01-02T00:57:23.787Z","avatar_url":"https://github.com/ms7m.png","language":"Python","funding_links":[],"categories":["Libraries"],"sub_categories":["Python"],"readme":"\u003cdiv align=\"center\"\u003e\n\u003cbr\u003e\n  \u003ch1\u003e dispike \u003c/h1\u003e\n  \u003ci\u003e ⚙️  A simple to use, powerful framework for creating stateless, independent bots using \u003ca href=\"https://discord.com/developers/docs/interactions/slash-commands\"\u003e Discord Slash Commands.\u003c/a\u003e \u003c/i\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n    \u003ca \u003e ⚡ Powered by \u003ca href=\"https://github.com/tiangolo/fastapi\"\u003e FastAPI.\u003c/a\u003e \u003c/a\u003e\n  \u003cbr\u003e\n  \u003cbr\u003e\n  \u003cp align=\"center\"\u003e\n    \u003cimg src=\"https://codecov.io/gh/ms7m/dispike/branch/master/graph/badge.svg?token=E5AXLZDP9O\"\u003e\n    \u003cimg src=\"https://github.com/ms7m/dispike/workflows/Test%20Dispike/badge.svg?branch=master\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/Available%20on%20PyPi-Dispike-blue?logo=pypi\u0026link=%22https://pypi.org/project/dispike%22\"\u003e\n    \u003cimg src=\"https://img.shields.io/badge/dynamic/json?color=blue\u0026label=PyPi%20Version\u0026query=%24.info.version\u0026url=https%3A%2F%2Fpypi.org%2Fpypi%2Fdispike%2Fjson\"\u003e\n  \u003c/p\u003e\n  \u003cbr\u003e\n\u003c/div\u003e\n\n### Notice\n****\nAs of 2022, I simply don't have the time to maintain this library. This library should function normally until Discord disables the v8 API. I hope I can resurrect this project in the future. If you would like to maintain or take over, I'm happy to help in the discord server, or sending me a quick email. :)\n***\n\n\n\n\n## 📦 Installation\n\n\n**Latest stable-version**\n```\npip install dispike\n```\n\n## 📚 Learn more\n- Read documentation [here](https://dispike.ms7m.me)\n- See an example bot [here](https://github.com/ms7m/dispike-example)\n- Join our Discord Server [here](https://discord.gg/yGgRmEYjju)\n\n***\n\u003cdiv align=\"center\"\u003e\n\u003ch2\u003e 🧑‍💻 Quick Start Examples \u003c/h2\u003e\n\u003c/div\u003e\n\n\n### Basic\n\n```python\n\nfrom dispike import Dispike, DiscordCommand, DiscordResponse\nfrom dispike import IncomingDiscordSlashInteraction\nfrom dispike.helper import Embed\n\nbot = Dispike(...)\n\n\ncommand = DiscordCommand(\n  name=\"stock\", description=\"Get the latest active stocks in the market!\"\n)\n\n\n@bot.on(\"stock\")\nasync def handle_stock_request(stockticker: str, ctx: IncomingDiscordSlashInteraction) -\u003e DiscordResponse:\n  get_price = function(stockticker...)\n  \n  embed=Embed()\n  embed.add_field(name=\"Stock Price for {stockticker}.\", value=\"Current price is {get_price}\", inline=True)\n  embed.set_footer(text=\"Request received by {ctx.member.user.username}\")\n  return DiscordResponse(embed=embed)\n\n\n\nif __name__ == \"__main__\":\n    bot.register(command)\n    bot.run()\n```\n\n\n### Advanced\n\n```python\nimport dispike\nfrom dispike import interactions, DiscordCommand, DiscordResponse\nfrom dispike import IncomingDiscordSlashInteraction\nfrom dispike.helper import Embed\n\n\nclass SampleGroupCollection(interactions.EventCollection):\n\n    def __init__(self):\n        self._api_key = \"...\"\n\n    def command_schemas(self):\n        return [\n            DiscordCommand(\n                name=\"lateststocks\", description=\"Get the highest performing stocks in the market currently!\"\n            ),\n            interactions.PerCommandRegistrationSettings(\n                schema=DiscordCommand(\n                    name=\"price\",\n                    description=\"return ticker price for server\",\n                    options=[],\n                ),\n                guild_id=11111111,\n            )\n        ]\n\n    def get_stock_information(self, stock_ticker):\n        return ...\n\n    def get_portfolio_stats(self, user_id):\n        return ...\n\n    @interactions.on(\"lateststocks\")\n    async def latest_stocks(self, ctx: IncomingDiscordSlashInteraction) -\u003e DiscordResponse:\n        embed = Embed()\n\n        # check user's porfolio by looking in the database by their discord ID\n        portfolio_stats = self.get_portfolio_stats(\n            ctx.member.user.id\n        )\n\n        embed.add_field(name=\"Stocks are doing good!\", value=f\"Current portfolio is {portfolio_stats}\", inline=True)\n        embed.set_footer(text=\"Request received by {ctx.member.user.username}\")\n        return DiscordResponse(embeds=[embed])\n\n    @interactions.on(\"price\")\n    async def get_stock_price(self, ctx: IncomingDiscordSlashInteraction, ticker: str) -\u003e DiscordResponse:\n        embed = Embed()\n        embed.add_field(name=f\"Stock Price for 1.\",\n                        value=f\"Current price is {self.get_stock_information(ticker)}\", inline=True)\n        embed.set_footer(text=\"Request received by {ctx.member.user.username}\")\n        return DiscordResponse(embeds=[embed])\n\n## Inside seperate file\n\nfrom dispike import Dispike, DiscordCommand\n\nbot = Dispike(...)\n\nbot.register_collection(SampleGroupCollection(), register_command_with_discord=True)\n\nif __name__ == \"__main__\":\n    bot.run(port=5000)\n```\n\n## Discord API Coverage\n\u003cdetails\u003e\u003csummary\u003eView Coverage\u003c/summary\u003e\n\u003cp\u003e\n\n| API Endpoint   |      Implementation   |\n|----------|:-------------:|\n| Get Global Application Commands |  **✅ Implemented** |\n| Create Global Application Command |    **✅ Implemented**   |\n| Edit Global Application Command |  **✅ Implemented** |\n| Delete Global Application Command | **✅ Implemented** |\n| Create Guild Application Command | **✅ Implemented** |\n| Edit Guild Application Command | **✅ Implemented** |\n| Delete Guild Application Command | **✅ Implemented** |\n| Create Interaction Response | **✅ Implemented** |\n| Edit Original Interaction Response | **✅ Implemented**|\n| Delete Original Interaction Response | **✅ Implemented** |\n| Create Followup Message |**✅ Implemented** |\n| Edit Followup Message | **✅ Implemented** |\n| Delete Followup Message | **✅ Implemented** |\n| Data Models and Types | **✅ Implemented** |\n| ApplicationCommand | **✅ Implemented** |\n| ApplicationCommandOption | **✅ Implemented** |\n| ApplicationCommandOptionType | **✅ Implemented** |\n| ApplicationCommandOptionChoice | **✅ Implemented** |\n| Interaction | **✅ Implemented** |\n| Interaction Response | **✅ Implemented** |\n| Message Components | **✅ Implemented** |\n| Buttons (Message Components) | **✅ Implemented** |\n| Action Rows (Message Components) | **✅ Implemented** |\n| Message Select (Message Components) | **✅ Implemented** |\n| Message Attachments | **⚠️ Not Implemented** |\n\n\u003c/p\u003e\n\u003c/details\u003e\n\n## ℹ️ Notice\n\n- Python 3.6+\n- Does not speak over the discord gateway. [discord-py-slash-command is what you are looking for.](https://github.com/eunwoo1104/discord-py-slash-command). \n- You will need a server to accept connections directly from discord!\n\n\n## 🧑‍💻 Development\n\nHelp is wanted in mantaining this library. Please try to direct PRs to the ``dev`` branch, and use black formatting (if possible).\n\n# 🎉 Special Thanks\n- [Squidtoon99](https://github.com/Squidtoon99)\n- [marshmallow](https://github.com/mrshmllow)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fms7m%2Fdispike","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fms7m%2Fdispike","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fms7m%2Fdispike/lists"}