From 534a15895be738f290655e14ed1d4f8036caa1c0 Mon Sep 17 00:00:00 2001 From: Andrei Date: Tue, 21 Feb 2017 16:53:13 -0800 Subject: [PATCH] Fix Channel.delete_messages --- disco/types/channel.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/disco/types/channel.py b/disco/types/channel.py index 664fd94..ee986be 100644 --- a/disco/types/channel.py +++ b/disco/types/channel.py @@ -1,5 +1,6 @@ import six +from six.moves import map from holster.enum import Enum from disco.util.snowflake import to_snowflake @@ -298,9 +299,9 @@ class Channel(SlottedModel, Permissible): List of messages (or message ids) to delete. All messages must originate from this channel. """ - messages = map(to_snowflake, messages) + message_ids = list(map(to_snowflake, messages)) - if not messages: + if not message_ids: return if self.can(self.client.state.me, Permissions.MANAGE_MESSAGES) and len(messages) > 2: