How can I grab the message link of a sent message in discordjs?

I’m trying to work on a more detailed logging system for my discord bot, and this is what I currently have:

client.on('message', message => {

    if (message.author.bot) return; //don't log its own messages

    const channel = client.channels.cache.get('805457298867879936'); //sent logs to this channel
    channel.send(
        `${message.author} in ${message.channel} of ${message.guild} said ${message.content}`, //log in discord channel
    );
    
    console.log(
        `${message.author.tag} in #${message.channel.name} of ${message.guild.name} said: ${message.content}`, //log in console
    );

client.login(token); //login

This code logs any messages sent that the bot can see in a specific channel and my console. However, I’d like to also have a message link to the sent message.
For example, this is what I currently have logged:
Kingamezz#02XX in #testing of Testing Server said: test
And what I’d like to have is this:
Kingamezz#02XX in #testing of Testing Server said: test (https://discord.com/channels/763786268181397524/805457298867879936/805502804134330448) so I can jump straight to the message.

I don’t know how to grab the message link of a message, the discordjs documentation doesn’t seem to have anything about message links. I’ve tried this:

channel.send(
    "https://discord.com/channels/" + guild.id + "/" + message.id
)

but it results in "guild is not defined". Am I going at this the right way?

178 thoughts on “How can I grab the message link of a sent message in discordjs?”

  1. I’ve been surfing on-line greater than 3 hours as of late,
    yet I by no means discovered any interesting article like
    yours. It’s lovely value sufficient for me. Personally, if all site owners and bloggers made good content material
    as you did, the internet can be a lot more useful than ever before.

    Reply
  2. Hello, i think that i saw you visited my weblog
    so i came to “return the favor”.I am trying to find things
    to improve my site!I suppose its ok to use a few of your ideas!!

    Reply
  3. Hi! I could have sworn I’ve been to this blog before but
    after reading through some of the post I realized it’s new to me.

    Nonetheless, I’m definitely glad I found it and I’ll be bookmarking and checking
    back frequently!

    Reply
  4. Aw, this was an extremely nice post. Taking a few minutes and
    actual effort to create a great article… but what can I say… I hesitate a
    lot and don’t seem to get anything done.

    Reply
  5. I’m really enjoying the design and layout of your blog. It’s a
    very easy on the eyes which makes it much more enjoyable
    for me to come here and visit more often. Did you hire
    out a developer to create your theme? Superb work!

    Reply
  6. Hey there fantastic blog! Does running a blog such as this require a
    large amount of work? I have virtually no understanding of
    coding however I had been hoping to start my own blog soon. Anyhow, if you have any recommendations or tips for new blog owners
    please share. I know this is off topic but I simply had to ask.
    Thank you!

    Reply
  7. Right here is the right website for anybody who would like
    to find out about this topic. You understand a whole lot its
    almost hard to argue with you (not that I really would want to…HaHa).
    You definitely put a fresh spin on a topic that’s been discussed
    for years. Excellent stuff, just excellent!

    Reply
  8. Hey! I just wanted to ask if you ever have any trouble
    with hackers? My last blog (wordpress) was hacked and I
    ended up losing several weeks of hard work due to no backup.
    Do you have any methods to stop hackers?

    Reply
  9. Hello! I’m at work browsing your blog from my
    new iphone! Just wanted to say I love reading your blog and look forward
    to all your posts! Keep up the excellent work!

    Reply
  10. Hello, i think that i saw you visited my website thus
    i came to “return the favor”.I’m trying to find things to enhance my website!I suppose
    its ok to use a few of your ideas!!

    Reply
  11. What’s Happening i’m new to this, I stumbled
    upon this I have discovered It positively helpful
    and it has aided me out loads. I hope to contribute & assist different users like its helped me.
    Good job.

    Reply
  12. Great beat ! I wish to apprentice while you amend your website, how
    can i subscribe for a blog website? The account helped me a acceptable deal.
    I had been tiny bit acquainted of this your
    broadcast provided bright clear concept

    Reply
  13. Thanks for some other great post. The place else may anyone get that kind of info in such an ideal means of writing?

    I’ve a presentation subsequent week, and I am at the look for such info.

    Reply
  14. You really make it appear so easy with your presentation but I to find
    this topic to be actually something which I feel I’d never understand.
    It seems too complicated and extremely extensive for me.
    I am taking a look ahead in your next submit, I’ll attempt to
    get the dangle of it!

    Reply
  15. I’m impressed, I have to admit. Rarely do I encounter
    a blog that’s both educative and amusing, and without
    a doubt, you have hit the nail on the head. The issue
    is an issue that too few people are speaking intelligently
    about. I am very happy that I stumbled across this in my hunt for
    something relating to this.

    Reply
  16. Write more, thats all I have to say. Literally,
    it seems as though you relied on the video to make your point.
    You definitely know what youre talking about, why waste your intelligence on just posting
    videos to your site when you could be giving us something enlightening to
    read?

    Reply
  17. I think this is one of the so much important information for
    me. And i’m glad studying your article. However want to commentary on some normal issues,
    The site style is wonderful, the articles is in reality excellent :
    D. Excellent process, cheers

    Reply
  18. It’s a pity you don’t have a donate button! I’d certainly
    donate to this excellent blog! I guess for now i’ll settle for book-marking and adding your RSS feed to my Google account.
    I look forward to brand new updates and will talk about
    this website with my Facebook group. Chat soon!

    Reply
  19. Excellent beat ! I wish to apprentice whilst you amend your
    website, how can i subscribe for a blog web site?
    The account aided me a applicable deal. I have been tiny bit acquainted of this your broadcast provided vivid transparent idea

    Reply
  20. Woah! I’m really enjoying the template/theme of this blog.
    It’s simple, yet effective. A lot of times it’s challenging to get that “perfect balance” between user friendliness and visual appearance.
    I must say you’ve done a awesome job with this. Additionally, the blog loads super quick for me on Internet explorer.
    Exceptional Blog!

    Reply
  21. Hi there, just became aware of your blog through Google, and found that
    it is truly informative. I am gonna watch out for brussels.

    I’ll be grateful if you continue this in future.
    Lots of people will be benefited from your writing. Cheers!

    Reply
  22. I think this is among the most vital information for me.
    And i’m glad reading your article. But want to remark on few
    general things, The web site style is ideal, the articles is really great : D.

    Good job, cheers

    Reply
  23. Every weekend i used to pay a quick visit this web site,
    because i want enjoyment, since this this web page conations truly pleasant funny information too.

    Reply
  24. My brother suggested I may like this website. He was
    entirely right. This publish actually made my day.
    You cann’t consider simply how so much time I had spent for this info!
    Thank you!

    Reply
  25. Today, I went to the beach front with my children. I found a sea shell and gave it to my
    4 year old daughter and said “You can hear the ocean if you put this to your ear.” She placed the shell
    to her ear and screamed. There was a hermit crab inside and it pinched her ear.

    She never wants to go back! LoL I know this is entirely off topic but
    I had to tell someone!

    Reply
  26. Wow, marvelous blog layout! How long have you been blogging for?
    you made blogging look easy. The overall look of your website is great, let alone the content!

    Reply
  27. Please let me know if you’re looking for a author for your site.

    You have some really great posts and I believe I would be a good asset.
    If you ever want to take some of the load off, I’d love
    to write some content for your blog in exchange for a link back
    to mine. Please send me an e-mail if interested. Thanks!

    Reply
  28. I have been browsing online more than 4 hours today, yet I never found any interesting article like
    yours. It is pretty worth enough for me. In my opinion, if all site owners and bloggers made good content
    as you did, the internet will be much more useful than ever before.

    Reply
  29. After exploring a handful of the blog posts on your blog, I
    truly like your way of writing a blog. I book-marked it to my bookmark webpage list
    and will be checking back in the near future. Please visit my
    website as well and let me know what you think.

    Reply
  30. I do not know whether it’s just me or if everybody else experiencing problems with your website.

    It appears like some of the text in your posts are running
    off the screen. Can someone else please provide
    feedback and let me know if this is happening to them too?
    This could be a problem with my browser because
    I’ve had this happen before. Kudos

    Reply
  31. Hey! I could have sworn I’ve been to this site before but
    after browsing through some of the post I realized
    it’s new to me. Anyways, I’m definitely happy I found it
    and I’ll be bookmarking and checking back frequently!

    Reply
  32. After going over a few of the blog posts
    on your site, I truly appreciate your way of writing
    a blog. I book marked it to my bookmark site list and will be checking back soon.
    Please visit my website too and tell me your opinion.

    Reply
  33. Superb blog! Do you have any recommendations for
    aspiring writers? I’m hoping to start my own site soon but I’m a little lost on everything.
    Would you propose starting with a free platform like WordPress
    or go for a paid option? There are so many choices out there that
    I’m completely overwhelmed .. Any tips? Thank you!

    Reply
  34. Every weekend i used to pay a quick visit this website, because i
    wish for enjoyment, for the reason that this this web page conations genuinely
    nice funny stuff too.

    Reply
  35. Oh my goodness! Amazing article dude! Thank you, However
    I am experiencing problems with your RSS. I don’t understand
    why I can’t join it. Is there anyone else getting similar RSS problems?
    Anybody who knows the solution can you kindly respond? Thanks!!

    Reply
  36. My brother suggested I would possibly like this website.
    He was once totally right. This publish truly made my day.
    You can not imagine simply how much time I had spent for this info!
    Thanks!

    Reply
  37. I have been browsing online more than 3 hours today,
    yet I never found any interesting article like yours.
    It is pretty worth enough for me. In my view, if all website owners and
    bloggers made good content as you did, the net will be much
    more useful than ever before.

    Reply
  38. When someone writes an piece of writing he/she keeps the idea of a
    user in his/her mind that how a user can be aware of it.
    Therefore that’s why this post is amazing. Thanks!

    Reply
  39. I’m no longer certain where you are getting your information, however great topic.
    I must spend a while studying more or working out more. Thank you for excellent info I was searching for this info for my mission.

    Reply
  40. excellent submit, very informative. I’m wondering
    why the opposite experts of this sector don’t realize this.
    You must proceed your writing. I’m confident,
    you have a great readers’ base already!

    Reply
  41. Heya i am for the first time here. I found this board and I
    find It really useful & it helped me out much. I hope to give something back and help others like you
    helped me.

    Reply
  42. Excellent post. I was checking constantly this blog and I
    am impressed! Very useful info specially the last part 🙂 I care for such info a lot.
    I was seeking this particular info for a very long time. Thank you and best of
    luck.

    Reply
  43. Hi there, just became alert to your blog through Google, and found that it is really informative.
    I’m going to watch out for brussels. I’ll appreciate if you continue this in future.
    Many people will be benefited from your writing. Cheers!

    Reply
  44. I blog frequently and I really appreciate your information. This
    article has really peaked my interest. I am going to
    bookmark your website and keep checking for new information about once a week.
    I subscribed to your RSS feed as well.

    Reply
  45. Hi would you mind sharing which blog platform you’re using?
    I’m going to start my own blog in the near
    future but I’m having a tough time choosing between BlogEngine/Wordpress/B2evolution and Drupal.

    The reason I ask is because your design seems different then most blogs
    and I’m looking for something unique. P.S
    Apologies for being off-topic but I had to ask!

    Have a look at my blog post: free fire hack

    Reply
  46. A person necessarily lend a hand to make seriously
    articles I would state. This is the first time I frequented your web page and thus far?
    I amazed with the research you made to make this actual submit incredible.
    Great process!

    Reply
  47. Yesterday, while I was at work, my cousin stole my iphone and tested to see if it can survive a thirty foot drop,
    just so she can be a youtube sensation. My iPad is now destroyed
    and she has 83 views. I know this is entirely off topic but
    I had to share it with someone!

    Reply
  48. Thanks a lot for sharing this with all of us you actually
    understand what you’re speaking about! Bookmarked. Please also discuss with my
    web site =). We will have a link trade contract among us

    Reply
  49. I am not sure where you are getting your information,
    but good topic. I needs to spend some time learning much more or understanding more.
    Thanks for excellent info I was looking for this info for my mission.

    Reply
  50. Hi there! This is my 1st comment here so I just wanted to give a quick shout out and say
    I genuinely enjoy reading your blog posts. Can you suggest any
    other blogs/websites/forums that deal with the same topics?
    Many thanks!

    Reply
  51. Hiya! Quick question that’s entirely off topic.
    Do you know how to make your site mobile friendly?
    My blog looks weird when viewing from my iphone 4.

    I’m trying to find a template or plugin that might be able
    to fix this problem. If you have any suggestions,
    please share. Cheers!

    Reply
  52. I do agree with all of the concepts you have
    presented for your post. They are really convincing and will certainly work.
    Nonetheless, the posts are too quick for newbies. May just you please extend them a little from next time?
    Thanks for the post.

    Reply
  53. Unquestionably believe that which you stated. Your favorite justification seemed to be on the net
    the simplest thing to be aware of. I say to you, I definitely get
    irked while people think about worries that they plainly don’t know about.

    You managed to hit the nail upon the top as well as defined out the whole thing without having side
    effect , people could take a signal. Will likely be back to
    get more. Thanks

    Reply
  54. I simply could not leave your site before suggesting that I extremely enjoyed the standard information an individual provide in your visitors?
    Is gonna be again frequently in order to check out new posts

    Reply
  55. Greetings from California! I’m bored at work so I decided to check out your
    site on my iphone during lunch break. I love the info you present here and can’t wait to take a look when I get home.
    I’m surprised at how fast your blog loaded on my phone .. I’m not even using WIFI, just 3G ..
    Anyways, excellent blog!

    Reply
  56. Hi! I’m at work browsing your blog from my new iphone 3gs!
    Just wanted to say I love reading through your blog and
    look forward to all your posts! Keep up the excellent work!

    Reply
  57. hello!,I really like your writing very much! proportion we communicate more about your post on AOL?
    I require an expert in this space to solve my problem.

    May be that’s you! Looking ahead to see you.

    Reply
  58. Magnificent goods from you, man. I’ve remember your stuff previous
    to and you’re simply extremely excellent. I actually like what you’ve acquired right here, certainly like what you are stating and the way during which you say it.
    You are making it enjoyable and you continue to care
    for to keep it wise. I cant wait to learn much more from you.
    This is actually a tremendous web site.

    Reply
  59. you’re truly a good webmaster. The site loading speed is amazing.
    It sort of feels that you are doing any unique trick.
    Also, The contents are masterpiece. you have done a excellent activity on this subject!

    Reply
  60. Howdy would you mind sharing which blog platform
    you’re using? I’m planning to start my own blog soon but I’m having a hard time deciding between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your design and style seems different then most blogs
    and I’m looking for something unique.
    P.S Apologies for being off-topic but I had to ask!

    Reply
  61. Hey! This post couldn’t be written any better! Reading through this post reminds me of my old
    room mate! He always kept talking about this.
    I will forward this page to him. Fairly certain he will have a
    good read. Many thanks for sharing!

    Reply
  62. Great work! That is the kind of information that are meant to be shared across
    the web. Shame on Google for no longer positioning this submit upper!
    Come on over and seek advice from my site . Thank you =)

    Reply
  63. Excellent post. I was checking continuously this weblog and I am
    impressed! Extremely useful information specially the last phase 🙂 I deal with such information a lot.

    I used to be seeking this particular info for a very long time.
    Thanks and good luck.

    Reply
  64. I’ll right away clutch your rss feed as I can’t in finding your email subscription link or newsletter service.
    Do you have any? Please permit me recognize so that I could
    subscribe. Thanks.

    Reply
  65. Hmm is anyone else having problems with the images on this blog loading?
    I’m trying to find out if its a problem on my end or if it’s the blog.
    Any feedback would be greatly appreciated.

    Reply
  66. Hi would you mind sharing which blog platform you’re working with?
    I’m looking to start my own blog in the near
    future but I’m having a tough time making a decision between BlogEngine/Wordpress/B2evolution and Drupal.
    The reason I ask is because your layout seems different then most
    blogs and I’m looking for something completely unique.

    P.S My apologies for getting off-topic but I had to ask!

    Reply
  67. Do you have a spam issue on this blog; I also am a blogger, and I was wondering your situation; we have created some nice methods and we are looking to exchange
    methods with other folks, why not shoot me an email if interested.

    Reply
  68. Hello there, I found your blog by the use of Google while looking for a related subject, your site
    came up, it seems to be great. I have bookmarked it in my google bookmarks.

    Hi there, simply become aware of your weblog thru Google,
    and found that it’s really informative. I am gonna be careful for brussels.
    I’ll be grateful if you happen to continue this in future.
    Numerous people shall be benefited from your writing. Cheers!

    Reply
  69. My developer is trying to persuade me to move to .net from PHP.
    I have always disliked the idea because of the expenses.
    But he’s tryiong none the less. I’ve been using WordPress on several websites for about a
    year and am concerned about switching to another platform.

    I have heard excellent things about blogengine.net.
    Is there a way I can transfer all my wordpress posts into it?
    Any help would be really appreciated!

    My blog free fire free diamonds

    Reply
  70. We’re a group of volunteers and opening a new scheme in our community.
    Your web site offered us with valuable info to work on.
    You have done an impressive job and our entire community will be grateful to you.

    Reply
  71. First of all I would like to say awesome
    blog! I had a quick question which I’d like to ask if you do not mind.
    I was curious to know how you center yourself and clear your mind before writing.
    I have had a hard time clearing my thoughts in getting my
    thoughts out there. I do take pleasure in writing however it just seems like the first
    10 to 15 minutes are usually wasted just trying to figure out how to begin. Any suggestions or tips?
    Thanks!

    Also visit my website :: free fire free diamonds

    Reply
  72. Hi there i am kavin, its my first time to commenting anywhere, when i read
    this post i thought i could also make comment due to this sensible
    piece of writing.

    Reply
  73. Hello! Someone in my Myspace group shared this site with us so I came to check it
    out. I’m definitely enjoying the information. I’m bookmarking and will be tweeting this to my
    followers! Superb blog and superb design and style.

    Reply
  74. I know this if off topic but I’m looking into starting my own blog
    and was curious what all is required to get set
    up? I’m assuming having a blog like yours would cost a pretty penny?
    I’m not very web savvy so I’m not 100% sure.
    Any recommendations or advice would be greatly appreciated.
    Thanks

    Reply
  75. I loved as much as you’ll receive carried out right here.
    The sketch is attractive, your authored subject matter stylish.
    nonetheless, you command get got an nervousness over that you wish be
    delivering the following. unwell unquestionably come more
    formerly again as exactly the same nearly a lot often inside case you shield this increase.

    Reply
  76. Good day! Do you know if they make any plugins to help with SEO?
    I’m trying to get my blog to rank for some targeted keywords but I’m not seeing
    very good success. If you know of any please share.
    Many thanks!

    Reply
  77. Fascinating blog! Is your theme custom made or did
    you download it from somewhere? A theme like yours with a few
    simple tweeks would really make my blog jump out.
    Please let me know where you got your theme. Thanks a lot

    Reply
  78. Heya i am for the first time here. I found this board and I find It truly useful & it helped me out much.
    I hope to give something back and help others like you aided me.

    Reply
  79. Excellent beat ! I would like to apprentice
    while you amend your website, how could i subscribe for
    a blog site? The account aided me a acceptable deal.
    I had been tiny bit acquainted of this your broadcast offered
    bright clear idea

    Reply
  80. Today, I went to the beachfront with my children. I found a sea shell and gave it to my 4 year old daughter and
    said “You can hear the ocean if you put this to your ear.” She
    put the shell to her ear and screamed. There was a hermit crab inside and
    it pinched her ear. She never wants to go back! LoL I know
    this is totally off topic but I had to tell someone!

    Reply
  81. I’m not sure where you are getting your info, but great topic.
    I needs to spend some time learning much more or understanding more.
    Thanks for magnificent information I was looking for this info for my
    mission.

    Reply
  82. You can definitely see your skills within the work you write.
    The world hopes for more passionate writers such as you
    who aren’t afraid to say how they believe. All the time follow your heart.

    Reply
  83. I’m amazed, I must say. Rarely do I come across a blog that’s both equally educative and amusing, and let me tell you, you have hit the nail on the head.

    The issue is something not enough folks are speaking intelligently about.
    I’m very happy I came across this in my search for something regarding this.

    Reply
  84. Does your site have a contact page? I’m having trouble locating it but, I’d like
    to shoot you an e-mail. I’ve got some creative ideas for your
    blog you might be interested in hearing. Either way, great site
    and I look forward to seeing it grow over time.

    Reply
  85. Definitely believe that which you stated. Your favorite reason seemed to be on the internet the easiest thing to be aware of.

    I say to you, I definitely get irked while people consider worries that
    they just do not know about. You managed to hit the nail upon the
    top as well as defined out the whole thing without having side effect
    , people can take a signal. Will probably be back to get
    more. Thanks

    Reply
  86. Wow, fantastic weblog structure! How long have you ever been blogging
    for? you made blogging glance easy. The whole glance of your site is fantastic, as smartly as the content!

    Reply
  87. My brother recommended I would possibly like this website. He was totally right.
    This publish truly made my day. You can not imagine simply how so much time I had spent for this info!
    Thanks!

    Reply
  88. Hello there! Would you mind if I share your blog with my zynga group?

    There’s a lot of folks that I think would really enjoy your content.

    Please let me know. Many thanks

    Reply
  89. Hi there excellent website! Does running a blog such as this
    require a massive amount work? I’ve very little understanding of coding
    however I was hoping to start my own blog soon. Anyhow, if you have any
    recommendations or tips for new blog owners please share.
    I know this is off topic nevertheless I simply had to ask.
    Appreciate it!

    Reply
  90. I think this is one of the most significant information for me.
    And i’m glad reading your article. But should remark on some
    general things, The website style is perfect,
    the articles is really great : D. Good job, cheers

    Reply
  91. You’ve made some really good points there. I looked on the net for more info
    about the issue and found most people will go along with your views on this website.

    Reply
  92. I am not positive where you’re getting your information, however great
    topic. I needs to spend some time finding out much more or understanding more.
    Thanks for fantastic info I was looking for this info
    for my mission.

    Reply
  93. Useful information. Lucky me I discovered your web site accidentally, and I’m surprised why this accident didn’t happened in advance!
    I bookmarked it.

    Reply