From 85ddea8e6f9e37f1b7ae174d298207f4b43a7952 Mon Sep 17 00:00:00 2001 From: gsd Date: Wed, 8 Mar 2023 21:36:07 +0300 Subject: [PATCH] =?UTF-8?q?=D0=BF=D0=BE=D1=80=D0=B0=20=D0=BF=D0=B5=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=20=D0=B7=D0=B0=D0=BB=D0=B8=D0=B2=D0=BE=D0=BC=20?= =?UTF-8?q?=D0=B5=D1=82=D1=81=D1=82=D0=B8=D1=82=D1=8C,=20=D0=BD=D0=BE=20?= =?UTF-8?q?=D0=BC=D0=BD=D0=B5=20=D0=BB=D0=B5=D0=BD=D1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- other_ext/register.py | 4 ++-- other_ext/url_checker.py | 4 ++-- other_ext/webhook_helper.py | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/other_ext/register.py b/other_ext/register.py index 8f66ae8..addf38f 100644 --- a/other_ext/register.py +++ b/other_ext/register.py @@ -57,7 +57,7 @@ class Extension: await interaction.followup.send(f'Профиль отвязан, друг', ephemeral=True) return - @commands.Cog.listener() + @core.listen() async def on_member_join(member: discord.Member): if member.guild.id != core.main_server_id: return @@ -80,7 +80,7 @@ class Extension: > Если не получается получить роль через бота пиши <@142269939783434240>""" return await auth_channel.send(content=welcome_message, delete_after=120) - @commands.Cog.listener() + @core.listen() async def on_message(message: discord.Message): print(message.guild.id != core.main_server_id, message.channel.id != self.auth_channel) if message.guild.id != core.main_server_id: diff --git a/other_ext/url_checker.py b/other_ext/url_checker.py index 72d6b2d..a910787 100644 --- a/other_ext/url_checker.py +++ b/other_ext/url_checker.py @@ -10,11 +10,11 @@ class Extension: def __init__(self, core): if not os.getenv("URLCHECKER_ENABLED", None): return None self.core = core - @commands.Cog.listener() + @core.listen() async def on_message(message: discord.Message): await self.__call__(message) - @commands.Cog.listener() + @core.listen() async def on_message_edit(before: discord.Message, after: discord.Message): await self.__call__(after) diff --git a/other_ext/webhook_helper.py b/other_ext/webhook_helper.py index df4d4ad..493c7ca 100644 --- a/other_ext/webhook_helper.py +++ b/other_ext/webhook_helper.py @@ -31,7 +31,7 @@ class Extension: "🔎":("unban", {"profile":"", "requester_profile":""}) } - @commands.Cog.listener() + @core.listen() async def on_message(message: discord.Message): if message.webhook_id != self.track_webhook_id: return @@ -43,7 +43,7 @@ class Extension: print(f"Cannot add reaction on webhook, error: {err}") return - @commands.Cog.listener() + @core.listen() async def on_reaction_add(reaction: discord.Reaction, user: discord.User): if reaction.message.webhook_id != self.track_webhook_id: return