Add a method to cancel_all conversations (#1183)

This commit is contained in:
Lonami Exo
2019-06-03 19:41:22 +02:00
parent 690a40be77
commit 4c3e467d25
3 changed files with 24 additions and 13 deletions

View File

@@ -1,5 +1,6 @@
import abc
import asyncio
import collections
import logging
import platform
import time
@@ -322,8 +323,9 @@ class TelegramBaseClient(abc.ABC):
# Some further state for subclasses
self._event_builders = []
self._conversations = {}
self._ids_in_conversations = {} # chat_id: count
# {chat_id: {Conversation}}
self._conversations = collections.defaultdict(set)
# Default parse mode
self._parse_mode = markdown