From 049698b5836b744bda575d1ddb69aec3f56af4e0 Mon Sep 17 00:00:00 2001 From: Bascter-Main <25437043+Bascter-Main@users.noreply.github.com> Date: Wed, 22 Jun 2022 12:32:11 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20dme=20=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=20(#13)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- dme/main.py | 9 +++++---- list.json | 4 ++-- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/dme/main.py b/dme/main.py index ea2c6e3..9f57024 100644 --- a/dme/main.py +++ b/dme/main.py @@ -1,12 +1,13 @@ +""" Module to automate message deletion. """ from pagermaid.listener import listener -from pagermaid.utils import Message, lang +from pagermaid.utils import Message, lang, alias_command from pagermaid.modules.prune import self_prune -@listener(is_plugin=False, command="dme", +@listener(is_plugin=False, outgoing=True, command=alias_command("dme"), need_admin=True, description=lang('sp_des'), parameters=lang('sp_parameters')) -async def dme(message: Message): +async def dme(_: Client, message: Message): """ Deletes specific amount of messages you sent. """ - await self_prune(message) + await self_prune(_, message) diff --git a/list.json b/list.json index 164bd5f..d4bc6af 100644 --- a/list.json +++ b/list.json @@ -182,10 +182,10 @@ }, { "name": "dme", - "version": "1.21", + "version": "1.22", "section": "chat", "maintainer": "xtaodada", - "size": "490 b", + "size": "506 b", "supported": true, "des-short": "删除当前对话您发送的特定数量的消息。", "des": "删除当前对话您发送的特定数量的消息。\n指令:-dme"