diff options
author | 2023-07-10 21:28:01 +0100 | |
---|---|---|
committer | 2023-08-26 11:34:11 +0200 | |
commit | 65baa20d521f0351c64de9865643ad5a192d5b48 (patch) | |
tree | 9cfaa87baab0b6f31775f3aef56ed7f36ead70fe | |
parent | delete members utils module (diff) |
remove unused pin_no_system_message util
-rw-r--r-- | bot/utils/messages.py | 15 |
1 files changed, 0 insertions, 15 deletions
diff --git a/bot/utils/messages.py b/bot/utils/messages.py index 175d4d4b8..4febf09dc 100644 --- a/bot/utils/messages.py +++ b/bot/utils/messages.py @@ -204,21 +204,6 @@ async def count_unique_users_reaction( return len(unique_users) -async def pin_no_system_message(message: discord.Message) -> bool: - """Pin the given message, wait a couple of seconds and try to delete the system message.""" - await message.pin() - - # Make sure that we give it enough time to deliver the message - await asyncio.sleep(2) - # Search for the system message in the last 10 messages - async for historical_message in message.channel.history(limit=10): - if historical_message.type == discord.MessageType.pins_add: - await historical_message.delete() - return True - - return False - - def sub_clyde(username: str | None) -> str | None: """ Replace "e"/"E" in any "clyde" in `username` with a Cyrillic "е"/"Е" and return the new string. |