summaryrefslogtreecommitdiff
path: root/AyaBot/aio/__init__.py
diff options
context:
space:
mode:
authorKyomotoi <[email protected]>2020-05-05 15:12:35 +0800
committerKyomotoi <[email protected]>2020-05-05 15:12:35 +0800
commit76bc38277716348f4ecc5d8adbc199d40d9c1064 (patch)
treee201a8fd4440b7875f7275bb755332f23b2e4604 /AyaBot/aio/__init__.py
parent5487ad601dea57c34d8721e4373db57df2fe6f17 (diff)
downloadATRI-76bc38277716348f4ecc5d8adbc199d40d9c1064.tar.gz
ATRI-76bc38277716348f4ecc5d8adbc199d40d9c1064.tar.bz2
ATRI-76bc38277716348f4ecc5d8adbc199d40d9c1064.zip
做了些小改动
以话慢慢补全功能 目前能用的 只有other
Diffstat (limited to 'AyaBot/aio/__init__.py')
-rw-r--r--AyaBot/aio/__init__.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/AyaBot/aio/__init__.py b/AyaBot/aio/__init__.py
new file mode 100644
index 0000000..3cc81f0
--- /dev/null
+++ b/AyaBot/aio/__init__.py
@@ -0,0 +1,8 @@
+import asyncio
+from functools import partial
+from typing import Any
+
+
+async def run_sync_func(func, *args, **kwargs) -> Any:
+ return await asyncio.get_event_loop().run_in_executor(
+ None, partial(func, *args, **kwargs))