[dev] mock does not response. #5923
Labels
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
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot#5923
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What Red version are you using?
3.5.0.dev1
What were you trying to do?
[p]mock userid pingWhat did you expect to happen?
That it would send
pong.What actually happened?
It instead sent errors to logs and nothing happened.
How can we reproduce this error?
Anything else?
No response
Do we want to actually support the usage of
[p]mockand[p]mockuserin DMs? It's always been only sort of supported but I'm wondering how useful it is. Proper mocking of a DM message would mean that you wouldn't be able to see the result of it as we would have to mockmsg.channelto that user's DM channel (which we currently are not doing but that creates a significant discrepancy I feel like).If we were to support mocking DMs, it would have to:
msg.channelto user's DM channel (which one can get withawait user.create_dm())discord.Memberconverter so that we at least get a user that we share a server with; note that we would have to later get a correspondingdiscord.Userobject for that member and set that undermsg.authorIf we just want to drop support for DMs, then it's simpler and all that needs to be done is:
discord.Member@commands.guild_only()decoratorThink dropping support would be the best and easiest solution here.
I agree though I think we should wait to see if anyone has some feedback about how they find this functionality useful. The previous implementation (3.4.x) is broken either way so even if the fix would be to properly support mocking DMs, it could still break some people's use cases. That part is inevitable since keeping a partially broken behavior isn't a good idea but either way it would be good to learn about whether there are reasons we might want to consider properly supporting mocking DMs over completely dropping it.
Since dropping the functionality is simple to implement, it probably won't hurt to give it a few days before we go ahead with it.
If I'm gonna be completely honest, I definitely don't find it useful in dms, I only find it useful in a discord text channels were I can freely use any ids of a user to test if the command(s) has the correct checks for example or any testing purpose related things.