diff --git a/redbot/core/bot.py b/redbot/core/bot.py index bac5afcbc..359b65e36 100644 --- a/redbot/core/bot.py +++ b/redbot/core/bot.py @@ -2477,23 +2477,34 @@ class Red( msg = await channel.send(box(page, lang=box_lang)) ret.append(msg) n_remaining = len(messages) - idx + files_perm = ( + not channel.guild or channel.permissions_for(channel.guild.me).attach_files + ) + options = ("more", "file") if files_perm else ("more",) if n_remaining > 0: if n_remaining == 1: - prompt_text = _( - "There is still one message remaining. Type {command_1} to continue" - " or {command_2} to upload all contents as a file." - ) + if files_perm: + prompt_text = _( + "There is still one message remaining. Type {command_1} to continue or {command_2} to upload all contents as a file." + ) + else: + prompt_text = _( + "There is still one message remaining. Type {command_1} to continue." + ) else: - prompt_text = _( - "There are still {count} messages remaining. Type {command_1} to continue" - " or {command_2} to upload all contents as a file." - ) + if files_perm: + prompt_text = _( + "There are still {count} messages remaining. Type {command_1} to continue or {command_2} to upload all contents as a file." + ) + else: + prompt_text = _( + "There are still {count} messages remaining. Type {command_1} to continue." + ) + query = await channel.send( prompt_text.format(count=n_remaining, command_1="`more`", command_2="`file`") ) - pred = MessagePredicate.lower_contained_in( - ("more", "file"), channel=channel, user=user - ) + pred = MessagePredicate.lower_contained_in(options, channel=channel, user=user) try: resp = await self.wait_for( "message",