Browse Source

пора перед заливом етстить, но мне лень

huy
gsd 2 years ago
parent
commit
85ddea8e6f
  1. 4
      other_ext/register.py
  2. 4
      other_ext/url_checker.py
  3. 4
      other_ext/webhook_helper.py

4
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:

4
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)

4
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

Loading…
Cancel
Save