aboutsummaryrefslogtreecommitdiff
path: root/discord/abc.py
diff options
context:
space:
mode:
Diffstat (limited to 'discord/abc.py')
-rw-r--r--discord/abc.py22
1 files changed, 22 insertions, 0 deletions
diff --git a/discord/abc.py b/discord/abc.py
index 1ad6fb50..d0ddd42d 100644
--- a/discord/abc.py
+++ b/discord/abc.py
@@ -776,3 +776,25 @@ class Messageable(metaclass=abc.ABCMeta):
counter += 1
"""
return HistoryIterator(self, limit=limit, before=before, after=after, around=around, reverse=reverse)
+
+ @asyncio.coroutine
+ def ack(self):
+ """|coro|
+
+ Marks this channel as read.
+
+ The user must not be a bot user.
+
+ Raises
+ -------
+ HTTPException
+ Acking failed.
+ ClientException
+ You must not be a bot user.
+ """
+
+ state = self._state
+ if state.is_bot:
+ raise ClientException('Must not be a bot account to ack messages.')
+ channel = yield from self._get_channel()
+ yield from state.http.ack_channel(channel.id)