Sort channels listing

This commit is contained in:
Jeremy Zhang 2017-04-09 02:16:20 +00:00
parent 50b216d23a
commit 6535240bbe

View File

@ -180,7 +180,7 @@ def get_guild_channels(guild_id):
if result["read"]: if result["read"]:
result_channels.append(result) result_channels.append(result)
return result_channels return sorted(result_channels, key=lambda k: k['channel']['position'])
def filter_guild_channel(guild_id, channel_id): def filter_guild_channel(guild_id, channel_id):
channels = get_guild_channels(guild_id) channels = get_guild_channels(guild_id)