Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add message link redirect #7191

Closed
ghost opened this issue Jul 9, 2021 · 3 comments
Closed

Add message link redirect #7191

ghost opened this issue Jul 9, 2021 · 3 comments
Labels
feature request This is a feature request.

Comments

@ghost
Copy link

ghost commented Jul 9, 2021

Summary

With the above feature, the bot can get a discord.Message Type back with just the message link provided/

What is the feature request for?

discord.ext.commands

The Problem

Currently, you can only get a message's message link, but not reversing the function and get the message Type.

For example:

# To get a message link
message_link = message.jump_url  # we have that attribute

# The function I am suggesting

message = await bot.fetch_message(message_link)
print(type(message))
>> discord.Message

print(type(message_link))
>> str object

So that we can reverse the entire function and get a message type return back.

The Ideal Solution

Use the re library and use some regex to seperate the slashs of the links which represents the guild ID, channel ID and message ID respectively/

The Current Solution

No response

Additional Context

No response

@ghost ghost added the feature request This is a feature request. label Jul 9, 2021
@jay3332
Copy link
Contributor

jay3332 commented Jul 9, 2021

MessageConverter does this for you already

@ramansrivastava
Copy link

hey i am intermediate in python ,is there anything i can help with?

@OwenHunter
Copy link

@ramansrivastava This issue isn't actually an issue, it is a feature that the person didn't know about.
In future, rather than messaging asking if there is anything you can help with, have a look and see for yourself if there is any issue that you know you can fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request This is a feature request.
Projects
None yet
Development

No branches or pull requests

4 participants