[Core] Exception thrown on help when blocked #2681

Closed
opened 2019-05-16 01:27:53 +02:00 by aikaterna · 0 comments
aikaterna commented 2019-05-16 01:27:53 +02:00 (Migrated from github.com)

Command bugs

Command name

[p]help

What cog is this command from?

help.py

What were you expecting to happen?

For the bot to say in the invoking channel "I couldn't send the help message to you in DM. Either you blocked me or you disabled DMs in this server."

What actually happened?

019-05-15 16:23:44] [ERROR] red: Exception in command 'help'
Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 63, in wrapped
    ret = await coro(*args, **kwargs)
  File "/usr/local/lib/python3.7/site-packages/redbot/core/commands/help.py", line 513, in red_help
    await ctx.bot.send_help_for(ctx, thing_to_get_help_for)
  File "/usr/local/lib/python3.7/site-packages/redbot/core/bot.py", line 132, in send_help_for
    return await self._help_formatter.send_help(ctx, help_for)
  File "/usr/local/lib/python3.7/site-packages/redbot/core/commands/help.py", line 95, in send_help
    await self.format_bot_help(ctx)
  File "/usr/local/lib/python3.7/site-packages/redbot/core/commands/help.py", line 394, in format_bot_help
    await self.send_pages(ctx, pages, embed=False)
  File "/usr/local/lib/python3.7/site-packages/redbot/core/commands/help.py", line 500, in send_pages
    await destination.send(page)
  File "/usr/local/lib/python3.7/site-packages/discord/abc.py", line 776, in send
    data = await state.http.send_message(channel.id, content, tts=tts, embed=embed, nonce=nonce)
  File "/usr/local/lib/python3.7/site-packages/discord/http.py", line 218, in request
    raise Forbidden(r, data)
discord.errors.Forbidden: FORBIDDEN (status code: 403): Cannot send messages to this user

How can we reproduce this issue?

Block the bot.
Use the help command.

# Command bugs #### Command name [p]help #### What cog is this command from? help.py #### What were you expecting to happen? For the bot to say in the invoking channel "I couldn't send the help message to you in DM. Either you blocked me or you disabled DMs in this server." #### What actually happened? ``` 019-05-15 16:23:44] [ERROR] red: Exception in command 'help' Traceback (most recent call last): File "/usr/local/lib/python3.7/site-packages/discord/ext/commands/core.py", line 63, in wrapped ret = await coro(*args, **kwargs) File "/usr/local/lib/python3.7/site-packages/redbot/core/commands/help.py", line 513, in red_help await ctx.bot.send_help_for(ctx, thing_to_get_help_for) File "/usr/local/lib/python3.7/site-packages/redbot/core/bot.py", line 132, in send_help_for return await self._help_formatter.send_help(ctx, help_for) File "/usr/local/lib/python3.7/site-packages/redbot/core/commands/help.py", line 95, in send_help await self.format_bot_help(ctx) File "/usr/local/lib/python3.7/site-packages/redbot/core/commands/help.py", line 394, in format_bot_help await self.send_pages(ctx, pages, embed=False) File "/usr/local/lib/python3.7/site-packages/redbot/core/commands/help.py", line 500, in send_pages await destination.send(page) File "/usr/local/lib/python3.7/site-packages/discord/abc.py", line 776, in send data = await state.http.send_message(channel.id, content, tts=tts, embed=embed, nonce=nonce) File "/usr/local/lib/python3.7/site-packages/discord/http.py", line 218, in request raise Forbidden(r, data) discord.errors.Forbidden: FORBIDDEN (status code: 403): Cannot send messages to this user ``` #### How can we reproduce this issue? Block the bot. Use the help command.
Sign in to join this conversation.
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
Mrcoolgamer11/Red-DiscordBot#2681
No description provided.