If they can't write to a channel, then no attaching files

This commit is contained in:
Jeremy Zhang 2018-08-17 03:32:14 +00:00
parent a742f08f6d
commit 6f692ed730

View File

@ -229,7 +229,7 @@ def get_guild_channels(guild_id, force_everyone=False, forced_role=0):
result["write"] = False result["write"] = False
if not bot_result["mention_everyone"]: if not bot_result["mention_everyone"]:
result["mention_everyone"] = False result["mention_everyone"] = False
if not bot_result["attach_files"] or not db_guild.file_upload: if not bot_result["attach_files"] or not db_guild.file_upload or not result["write"]:
result["attach_files"] = False result["attach_files"] = False
result_channels.append(result) result_channels.append(result)
return sorted(result_channels, key=lambda k: k['channel']['position']) return sorted(result_channels, key=lambda k: k['channel']['position'])