aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRapptz <[email protected]>2020-09-13 21:10:41 -0400
committerRapptz <[email protected]>2020-09-14 01:18:09 -0400
commit986adae108df6350baebd7b28807777f2333dc19 (patch)
treea8d01bacfb98d0b4e46f25663625d864a41e5503
parentAdd missing permission in clone documentation (diff)
downloaddiscord.py-986adae108df6350baebd7b28807777f2333dc19.tar.xz
discord.py-986adae108df6350baebd7b28807777f2333dc19.zip
Revert "Add fetch_message_fast using history endpoint"
This reverts commit a309088ae4be7c2e837e5d180822c0f9060fe86d. A rate limited was added to this method after 5 years defeating the purpose of it.
-rw-r--r--discord/abc.py37
1 files changed, 0 insertions, 37 deletions
diff --git a/discord/abc.py b/discord/abc.py
index 369fab3b..e50726f7 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -933,7 +933,6 @@ class Messageable(metaclass=abc.ABCMeta):
"""
return Typing(self)
- @utils.deprecated('fetch_message_fast')
async def fetch_message(self, id):
"""|coro|
@@ -941,8 +940,6 @@ class Messageable(metaclass=abc.ABCMeta):
This can only be used by bot accounts.
- Prefer using :meth:`fetch_message_fast`.
-
Parameters
------------
id: :class:`int`
@@ -967,40 +964,6 @@ class Messageable(metaclass=abc.ABCMeta):
data = await self._state.http.get_message(channel.id, id)
return self._state.create_message(channel=channel, data=data)
- async def fetch_message_fast(self, id):
- """|coro|
-
- Retrieves a single :class:`~discord.Message` from the destination, using
- the history endpoint.
-
- .. versionadded:: 1.5
-
- Parameters
- ------------
- id: :class:`int`
- The message ID to look for.
-
- Raises
- --------
- ~discord.NotFound
- The specified channel was not found.
- ~discord.Forbidden
- You do not have permissions to get channel message history.
- ~discord.HTTPException
- The request to get message history failed.
-
- Returns
- --------
- Optional[:class:`~discord.Message`]
- The message asked for, or None if there is no match.
- """
-
- channel = await self._get_channel()
- data = await self._state.http.logs_from(channel.id, limit=1, around=id)
- if data and int(data[0]['id']) == id:
- return self._state.create_message(channel=channel, data=data[0])
- return None
-
async def pins(self):
"""|coro|