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