| @@ -346,16 +346,16 @@ class GuildChannel: | |||||||
|     def overwrites(self): |     def overwrites(self): | ||||||
|         """Returns all of the channel's overwrites. |         """Returns all of the channel's overwrites. | ||||||
|  |  | ||||||
|         This is returned as a list of two-element tuples containing the target, |         This is returned as a dictionary where the key contains the target which | ||||||
|         which can be either a :class:`Role` or a :class:`Member` and the overwrite |         can be either a :class:`Role` or a :class:`Member` and the key is the | ||||||
|         as the second element as a :class:`PermissionOverwrite`. |         overwrite as a :class:`PermissionOverwrite`. | ||||||
|  |  | ||||||
|         Returns |         Returns | ||||||
|         -------- |         -------- | ||||||
|         List[Tuple[Union[:class:`Role`, :class:`Member`], :class:`PermissionOverwrite`]]: |         Mapping[Union[:class:`Role`, :class:`Member`], :class:`PermissionOverwrite`]: | ||||||
|             The channel's permission overwrites. |             The channel's permission overwrites. | ||||||
|         """ |         """ | ||||||
|         ret = [] |         ret = {} | ||||||
|         for ow in self._overwrites: |         for ow in self._overwrites: | ||||||
|             allow = Permissions(ow.allow) |             allow = Permissions(ow.allow) | ||||||
|             deny = Permissions(ow.deny) |             deny = Permissions(ow.deny) | ||||||
| @@ -365,8 +365,7 @@ class GuildChannel: | |||||||
|                 target = self.guild.get_role(ow.id) |                 target = self.guild.get_role(ow.id) | ||||||
|             elif ow.type == 'member': |             elif ow.type == 'member': | ||||||
|                 target = self.guild.get_member(ow.id) |                 target = self.guild.get_member(ow.id) | ||||||
|  |             ret[target] = overwrite | ||||||
|             ret.append((target, overwrite)) |  | ||||||
|         return ret |         return ret | ||||||
|  |  | ||||||
|     @property |     @property | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user