You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Discord is now providing channel jump links in the client and even renders them to look like channel mentions. As a result, some users are attempting to use the jump link to the channel instead of traditional mentions or ID's inside commands. This is failing and causing unexpected results in some cases.
The Ideal Solution
Add support in the GuildChannelConverter to parse and find channels based on a provided jump link to the channel.
The Current Solution
The current solution is including a secondary converter alongside a ChannelConverter just to detect jump links and extract channel ID that way.
Additional Context
No response
The text was updated successfully, but these errors were encountered:
This feature idea is okay, but I think it has some unintended consequence with potential information leakage that wasn't present before. For example, right now, if you have discord.TextChannel as a type hint for your command with a @guild_only() decorator, then you can be reasonably sure that the TextChannel exists only within the confines of that guild but with URLs you now have access to external channels. This is actually a subtle problem in the pre-existing message converters which means that users have to deal with it. I'd prefer to not let people have to deal with it here, but some people might actually want external channels so it's an odd balance. Personally, I err on the side of "if you're running this in a guild context, then it should only match channels within the guild".
Realistically what I would expect from the library is to just extract the channel ID from the jump link and if that channel doesn't exist within the current context raise BadArgument error. If I want to accept channels outside of the current guild then I will gladly write my own converter for that since it's a less common use-case. I was also thinking about this and how to handle message jump links since you could extract the channel ID from that as well to get the channel context. I think the same should apply there, extract the channel ID and ignore everything else.
Summary
Channel Converters should support channel links
What is the feature request for?
discord.ext.commands
The Problem
Discord is now providing channel jump links in the client and even renders them to look like channel mentions. As a result, some users are attempting to use the jump link to the channel instead of traditional mentions or ID's inside commands. This is failing and causing unexpected results in some cases.
The Ideal Solution
Add support in the GuildChannelConverter to parse and find channels based on a provided jump link to the channel.
The Current Solution
The current solution is including a secondary converter alongside a ChannelConverter just to detect jump links and extract channel ID that way.
Additional Context
No response
The text was updated successfully, but these errors were encountered: