{"id":17963237,"url":"https://github.com/kajdev/snowfin","last_synced_at":"2025-03-25T04:33:21.826Z","repository":{"id":36956938,"uuid":"433233970","full_name":"KAJdev/snowfin","owner":"KAJdev","description":"A discord http interactions framework built on top of Sanic","archived":false,"fork":false,"pushed_at":"2022-06-20T08:47:23.000Z","size":123,"stargazers_count":13,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T09:13:46.287Z","etag":null,"topics":["discord","discord-api-wrapper","interactions","python3"],"latest_commit_sha":null,"homepage":"","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/KAJdev.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":"2021-11-29T23:56:05.000Z","updated_at":"2024-11-09T00:50:49.000Z","dependencies_parsed_at":"2022-08-24T21:01:03.325Z","dependency_job_id":null,"html_url":"https://github.com/KAJdev/snowfin","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KAJdev%2Fsnowfin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KAJdev%2Fsnowfin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KAJdev%2Fsnowfin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KAJdev%2Fsnowfin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KAJdev","download_url":"https://codeload.github.com/KAJdev/snowfin/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245401366,"owners_count":20609163,"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-api-wrapper","interactions","python3"],"created_at":"2024-10-29T11:24:58.777Z","updated_at":"2025-03-25T04:33:21.818Z","avatar_url":"https://github.com/KAJdev.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# snowfin\nAn async discord http interactions framework built on top of Sanic.\n\n## Installing\n\u003e Please note that the library requires at least python 3.10\n```sh\npip install snowfin\n#or\npoetry add snowfin\n```\n\n## Examples\n\n### Simple slash command\n```python\nimport asyncio\nimport snowfin\nfrom snowfin.client import AutoDefer\nfrom snowfin.models import Interaction\nfrom snowfin.response import MessageResponse\n\nbot = snowfin.Client('public_key', 'application_id', 'token', auto_defer=AutoDefer(enabled=True, timeout=0, ephemeral=True))\n\n@snowfin.slash_command(name=\"hello\")\nasync def hello(context: Interaction):\n    # we don't have to do anything, just don't return a response until we need to\n    await asyncio.sleep(10)\n    return MessageResponse('Ok, *Now* I want to respond ;)')\n\nbot.run(\"0.0.0.0\", 80, debug=True)\n```\n\n### Slash command with a deferred response\n```python\nimport asyncio\nimport snowfin\nfrom snowfin.models import Interaction\nfrom snowfin.response import DeferredResponse, MessageResponse\n\nbot = snowfin.Client('public_key', 'application_id', 'token', auto_defer=True)\n\n@snowfin.slash_command(name=\"hello\")\nasync def on_slash(context: Interaction):\n    return DeferredResponse(on_slash_defer)\n\nasync def on_slash_defer(context: Interaction):\n    await asyncio.sleep(1)\n    return MessageResponse('Ok, *Now* I want to respond ;)')\n\nbot.run(\"0.0.0.0\", 80, debug=True)\n```\n\nYou can see more examples [here](https://github.com/KAJdev/snowfin/tree/main/examples)\n\n## Links\n\n- Library Docs (Coming Soon)\n- [Discord Server](https://discord.gg/mNwKWUkhh8)\n- [Interaction Docs](https://discord.com/developers/docs/interactions/application-commands)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkajdev%2Fsnowfin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkajdev%2Fsnowfin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkajdev%2Fsnowfin/lists"}