disunity
Advanced tools
+1
-1
| Metadata-Version: 2.1 | ||
| Name: disunity | ||
| Version: 0.1.10 | ||
| Version: 0.1.11 | ||
| Summary: Python framework for Discord interactions using a web server | ||
@@ -5,0 +5,0 @@ Author: Tadeo Murillo, |
+1
-1
@@ -13,3 +13,3 @@ [build-system] | ||
| name = "disunity" | ||
| version = "0.1.10" | ||
| version = "0.1.11" | ||
| authors = [ | ||
@@ -16,0 +16,0 @@ {name="Tadeo Murillo"}, |
| Metadata-Version: 2.1 | ||
| Name: disunity | ||
| Version: 0.1.10 | ||
| Version: 0.1.11 | ||
| Summary: Python framework for Discord interactions using a web server | ||
@@ -5,0 +5,0 @@ Author: Tadeo Murillo, |
@@ -51,2 +51,3 @@ import asyncio | ||
| self.__cache: cache.ApplicationCache = cache.ApplicationCache() | ||
| self.__packages = dict() | ||
| self.__key = VerifyKey(bytes.fromhex(self.config["CLIENT_PUBLIC_KEY"])) | ||
@@ -60,2 +61,5 @@ self.add_url_rule( | ||
| return self.__cache | ||
| def get_package(self, package_name): | ||
| return self.__packages.get(package_name, None) | ||
@@ -177,2 +181,3 @@ def error_handler(self, exc: Exception): | ||
| setup(self) | ||
| self.__packages[type(package).__name__] = package | ||
@@ -205,2 +210,11 @@ def register_package(self, package_class): | ||
| async def global_after_interaction(self, context: Context): | ||
| """Called after the execution of any application command, message components, and modal submits. | ||
| Args: | ||
| context (Context): Application command or message component context. | ||
| """ | ||
| pass | ||
| async def interactions(self): | ||
@@ -276,6 +290,11 @@ self.verify(request) | ||
| ctx.acked = True | ||
| asyncio.create_task(coroutine(ctx)) | ||
| async def combined_task(ctx): | ||
| await coroutine(ctx) | ||
| await self.after_interaction(ctx) | ||
| asyncio.create_task(combined_task(ctx)) | ||
| return jsonify(response) | ||
| response = await coroutine(ctx) | ||
| asyncio.create_task(self.after_interaction(ctx)) | ||
| return jsonify(response) | ||
@@ -312,6 +331,11 @@ | ||
| context.acked = True | ||
| asyncio.create_task(component(context)) | ||
| async def combined_task(ctx): | ||
| await component(context) | ||
| await self.after_interaction(ctx) | ||
| asyncio.create_task(combined_task(ctx)) | ||
| return jsonify(response) | ||
| maybe_response = await component(context) | ||
| asyncio.create_task(self.after_interaction(ctx)) | ||
| return jsonify(maybe_response) | ||
@@ -357,2 +381,3 @@ | ||
| maybe_response = await component(context) | ||
| asyncio.create_task(self.after_interaction(ctx)) | ||
| return jsonify(maybe_response) |
Alert delta unavailable
Currently unable to show alert delta for PyPI packages.
61606
1.58%1380
1.4%