aboutsummaryrefslogtreecommitdiff
path: root/discord/client.py
diff options
context:
space:
mode:
authorRapptz <[email protected]>2016-10-17 01:10:22 -0400
committerRapptz <[email protected]>2017-01-03 09:51:52 -0500
commit53ab2631252bf0977446d762f07b3821edb151ee (patch)
treeabb8a2e7a966aadb22df8a3ca2220b646eae3765 /discord/client.py
parent[commands] Bot skip check now works with the new __eq__ changes. (diff)
downloaddiscord.py-53ab2631252bf0977446d762f07b3821edb151ee.tar.xz
discord.py-53ab2631252bf0977446d762f07b3821edb151ee.zip
Split channel types.
This splits them into the following: * DMChannel * GroupChannel * VoiceChannel * TextChannel This also makes the channels "stateful".
Diffstat (limited to 'discord/client.py')
-rw-r--r--discord/client.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/discord/client.py b/discord/client.py
index b1dd1c22..94aaa6c4 100644
--- a/discord/client.py
+++ b/discord/client.py
@@ -27,7 +27,7 @@ DEALINGS IN THE SOFTWARE.
from . import __version__ as library_version
from .user import User
from .member import Member
-from .channel import Channel, PrivateChannel
+from .channel import *
from .server import Server
from .message import Message
from .invite import Invite
@@ -261,9 +261,9 @@ class Client:
@asyncio.coroutine
def _resolve_destination(self, destination):
- if isinstance(destination, Channel):
+ if isinstance(destination, TextChannel):
return destination.id, destination.server.id
- elif isinstance(destination, PrivateChannel):
+ elif isinstance(destination, DMChannel):
return destination.id, None
elif isinstance(destination, Server):
return destination.id, destination.id
@@ -283,7 +283,7 @@ class Client:
# couldn't find it in cache so YOLO
return destination.id, destination.id
else:
- fmt = 'Destination must be Channel, PrivateChannel, User, or Object. Received {0.__class__.__name__}'
+ fmt = 'Destination must be TextChannel, DMChannel, User, or Object. Received {0.__class__.__name__}'
raise InvalidArgument(fmt.format(destination))
def __getattr__(self, name):