diff --git a/jarvis/cogs/botutil.py b/jarvis/cogs/botutil.py index 23e0739..647232d 100644 --- a/jarvis/cogs/botutil.py +++ b/jarvis/cogs/botutil.py @@ -5,7 +5,7 @@ from io import BytesIO from aiofile import AIOFile, LineReader from dis_snek import MessageContext, Scale, Snake from dis_snek.models.discord.file import File -from dis_snek.models.snek.command import message_command +from molter import msg_command class BotutilCog(Scale): @@ -15,7 +15,7 @@ class BotutilCog(Scale): self.bot = bot self.logger = logging.getLogger(__name__) - @message_command(name="tail") + @msg_command(name="tail") async def _tail(self, ctx: MessageContext, count: int = 10) -> None: if ctx.author.id != self.bot.owner.id: return @@ -28,7 +28,7 @@ class BotutilCog(Scale): log = "".join(lines) await ctx.reply(content=f"```\n{log}\n```") - @message_command(name="log") + @msg_command(name="log") async def _log(self, ctx: MessageContext) -> None: if ctx.author.id != self.bot.owner.id: return diff --git a/poetry.lock b/poetry.lock index 74b3af0..c1b3a01 100644 --- a/poetry.lock +++ b/poetry.lock @@ -1,17 +1,3 @@ -[[package]] -name = "aiofile" -version = "3.7.4" -description = "Asynchronous file operations." -category = "main" -optional = false -python-versions = ">3.4.*, <4" - -[package.dependencies] -caio = ">=0.9.0,<0.10.0" - -[package.extras] -develop = ["aiomisc", "asynctest", "pytest", "pytest-cov"] - [[package]] name = "aiohttp" version = "3.8.1" @@ -65,17 +51,6 @@ docs = ["furo", "sphinx", "zope.interface", "sphinx-notfound-page"] tests = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "zope.interface", "cloudpickle"] tests_no_zope = ["coverage[toml] (>=5.0.2)", "hypothesis", "pympler", "pytest (>=4.3.0)", "six", "mypy", "pytest-mypy-plugins", "cloudpickle"] -[[package]] -name = "caio" -version = "0.9.5" -description = "Asynchronous file IO for Linux Posix and Windows." -category = "main" -optional = false -python-versions = ">=3.5.*, <4" - -[package.extras] -develop = ["aiomisc", "pytest", "pytest-cov"] - [[package]] name = "certifi" version = "2021.10.8" @@ -116,7 +91,7 @@ langdetect = ["langdetect"] [[package]] name = "dis-snek" -version = "7.0.0" +version = "8.0.0" description = "An API wrapper for Discord filled with snakes" category = "main" optional = false @@ -128,6 +103,10 @@ attrs = "*" discord-typings = "*" tomli = "*" +[package.extras] +all = ["PyNaCl (>=1.5.0,<1.6)", "yt-dlp"] +voice = ["PyNaCl (>=1.5.0,<1.6)", "yt-dlp"] + [[package]] name = "discord-typings" version = "0.3.1" @@ -217,6 +196,17 @@ docs = ["sphinx (==4.4.0)", "sphinx-issues (==3.0.1)", "alabaster (==0.7.12)", " lint = ["mypy (==0.940)", "flake8 (==4.0.1)", "flake8-bugbear (==22.1.11)", "pre-commit (>=2.4,<3.0)"] tests = ["pytest", "pytz", "simplejson"] +[[package]] +name = "molter" +version = "0.11.0" +description = "Shedding a new skin on Dis-Snek's commands." +category = "main" +optional = false +python-versions = ">=3.10" + +[package.dependencies] +dis-snek = ">=8.0.0" + [[package]] name = "mongoengine" version = "0.23.1" @@ -619,13 +609,9 @@ multidict = ">=4.0" [metadata] lock-version = "1.1" python-versions = "^3.10" -content-hash = "ef0ec99d8c98190d25cda0b8f4420738e569fd73b605dbae2a366a392a9cca7d" +content-hash = "af521f2487cac903d3766516484dcfdf999d222abacb1a8233248489591f6a34" [metadata.files] -aiofile = [ - {file = "aiofile-3.7.4-py3-none-any.whl", hash = "sha256:0e2a524e4714efda47ce8964b13d4da94cf553411f9f6da813df615a4cd73d95"}, - {file = "aiofile-3.7.4.tar.gz", hash = "sha256:0aefa1d91d000d3a20a515d153db2ebf713076c7c94edf2fca85d3d83316abc5"}, -] aiohttp = [ {file = "aiohttp-3.8.1-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:1ed0b6477896559f17b9eaeb6d38e07f7f9ffe40b9f0f9627ae8b9926ae260a8"}, {file = "aiohttp-3.8.1-cp310-cp310-macosx_10_9_x86_64.whl", hash = "sha256:7dadf3c307b31e0e61689cbf9e06be7a867c563d5a63ce9dca578f956609abf8"}, @@ -712,23 +698,6 @@ attrs = [ {file = "attrs-21.4.0-py2.py3-none-any.whl", hash = "sha256:2d27e3784d7a565d36ab851fe94887c5eccd6a463168875832a1be79c82828b4"}, {file = "attrs-21.4.0.tar.gz", hash = "sha256:626ba8234211db98e869df76230a137c4c40a12d72445c45d5f5b716f076e2fd"}, ] -caio = [ - {file = "caio-0.9.5-cp310-cp310-macosx_10_15_x86_64.whl", hash = "sha256:cd1c20aab04c18f0534b3f0b59103a94dede3c7d7b43c9cc525df3980b4c7c54"}, - {file = "caio-0.9.5-cp310-cp310-macosx_10_9_universal2.whl", hash = "sha256:dd316270757d77f384c97e336588267e7942c1f1492a3a2e07b9a80dca027538"}, - {file = "caio-0.9.5-cp310-cp310-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:013aa374158c5074b3c65a0da6b9c6b20a987d85fb317dd077b045e84e2478e1"}, - {file = "caio-0.9.5-cp36-cp36m-macosx_10_14_x86_64.whl", hash = "sha256:d767faf537a9ea774e8408ba15a0f1dc734f06857c2d28bdf4258a63b5885f42"}, - {file = "caio-0.9.5-cp36-cp36m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:97d9a10522a8a25798229fc1113cfaba3832b1cd0c1a3648b009b9740ef5e054"}, - {file = "caio-0.9.5-cp37-cp37m-macosx_10_14_x86_64.whl", hash = "sha256:4fe9eff5cf7a2d6f3f418aeeccd11ce9a38329e07527b6f52da085edb44bc2fd"}, - {file = "caio-0.9.5-cp37-cp37m-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:b8b6be369139edd678817dc0a313392d710f66fb521c275dce0a9067089b346b"}, - {file = "caio-0.9.5-cp38-cp38-macosx_10_14_x86_64.whl", hash = "sha256:3ffc6259239e03962f9e14829e02795ca9d196eedf32fe61688ba6ed33da46c8"}, - {file = "caio-0.9.5-cp38-cp38-macosx_11_0_universal2.whl", hash = "sha256:7a19dfdec6736affb645da233a6007c2590678490d2a1e0f1fb82a696c0a1ddf"}, - {file = "caio-0.9.5-cp38-cp38-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:15f70d27e1009d279e4f9ff86290aad00b0511ce82a1879c40745244f0a9ec92"}, - {file = "caio-0.9.5-cp39-cp39-macosx_10_15_x86_64.whl", hash = "sha256:0427a58c1814a091bfbb84318d344fdb9a68f3d49adc74e5fdc7bc9478e1e4fe"}, - {file = "caio-0.9.5-cp39-cp39-macosx_10_9_universal2.whl", hash = "sha256:7f48fa58e5f699b428f1fd85e394ecec05be4048fcaf1fdf1981b748cd1e03a6"}, - {file = "caio-0.9.5-cp39-cp39-manylinux_2_12_x86_64.manylinux2010_x86_64.whl", hash = "sha256:01061288391020f28e1ab8b0437420f7fe1e0ecc29b4107f7a8dcf7789f33b22"}, - {file = "caio-0.9.5-py3-none-any.whl", hash = "sha256:3c74d84dff2bec5f93685cf2f32eb22e4cc5663434a9be5f4a759247229b69b3"}, - {file = "caio-0.9.5.tar.gz", hash = "sha256:167d9342a807bae441b2e88f9ecb62da2f236b319939a8679f68f510a0194c40"}, -] certifi = [ {file = "certifi-2021.10.8-py2.py3-none-any.whl", hash = "sha256:d62a0163eb4c2344ac042ab2bdf75399a71a2d8c7d47eac2e2ee91b9d6339569"}, {file = "certifi-2021.10.8.tar.gz", hash = "sha256:78884e7c1d4b00ce3cea67b44566851c4343c120abd683433ce934a68ea58872"}, @@ -742,8 +711,8 @@ dateparser = [ {file = "dateparser-1.1.1.tar.gz", hash = "sha256:038196b1f12c7397e38aad3d61588833257f6f552baa63a1499e6987fa8d42d9"}, ] dis-snek = [ - {file = "dis-snek-7.0.0.tar.gz", hash = "sha256:c39d0ff5e1f0cde3a0feefcd05f4a7d6de1d6b1aafbda745bbaa7a63d541af0f"}, - {file = "dis_snek-7.0.0-py3-none-any.whl", hash = "sha256:5a1fa72d3d5de96a7550a480d33a4f4a6ac8509391fa20890c2eb495fb45d221"}, + {file = "dis-snek-8.0.0.tar.gz", hash = "sha256:c035a4f664f9a638b80089f2a9a3330a4254fc227ef2c83c96582df06f392281"}, + {file = "dis_snek-8.0.0-py3-none-any.whl", hash = "sha256:3a89c8f78c27407fb67d42dfaa51be6a507306306779e45cd47687bd846b3b23"}, ] discord-typings = [ {file = "discord-typings-0.3.1.tar.gz", hash = "sha256:854cfb66d34edad49b36d8aaffc93179bb397a97c81caba2da02896e72821a74"}, @@ -827,6 +796,10 @@ marshmallow = [ {file = "marshmallow-3.15.0-py3-none-any.whl", hash = "sha256:ff79885ed43b579782f48c251d262e062bce49c65c52412458769a4fb57ac30f"}, {file = "marshmallow-3.15.0.tar.gz", hash = "sha256:2aaaab4f01ef4f5a011a21319af9fce17ab13bf28a026d1252adab0e035648d5"}, ] +molter = [ + {file = "molter-0.11.0-py3-none-any.whl", hash = "sha256:4ae311e34fc93bfa37643f86c382b1f104753e451e9904995f0f34f5edda8daa"}, + {file = "molter-0.11.0.tar.gz", hash = "sha256:1e06e021a00986b9218e67bce062cb52eab5c86e8187b28e68f7dca8df853aaa"}, +] mongoengine = [ {file = "mongoengine-0.23.1-py3-none-any.whl", hash = "sha256:3d1c8b9f5d43144bd726a3f01e58d2831c6fb112960a4a60b3a26fa85e026ab3"}, {file = "mongoengine-0.23.1.tar.gz", hash = "sha256:de275e70cd58891dc46eef43369c522ce450dccb6d6f1979cbc9b93e6bdaf6cb"}, diff --git a/pyproject.toml b/pyproject.toml index 3a00631..971dbb8 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -21,6 +21,8 @@ jarvis-core = {git = "https://git.zevaryx.com/stark-industries/jarvis/jarvis-cor aiohttp = "^3.8.1" pastypy = "^1.0.1" dateparser = "^1.1.1" +aiofile = "^3.7.4" +molter = "^0.11.0" [build-system] requires = ["poetry-core>=1.0.0"]