yti

YouTube Thumbnail Retriever by Asty'#8926 Get the thumbnail of any YouTube video from its link! **Includes:** • Different error message when no argument or an invalid link have been specified • Works with any YouTube video link for as long as it's valid (full, shortened, videos in playlists, with or without timestamp) • The ability to choose the output quality/size among those available from YouTube Preview in action: https://i.imgur.com/sfLpMVY.png

Sharedunrated

Content

69 lines
{=(COMMENT):Your tag settings. Put your server's main prefix and the name of this tag.
Will be displayed in the command's instructions.}
{=(prefix):!}
{=(tagname):yti}

{=(vidlink):{if({in(?t=):{1}}==true):{args(1):?t=}|{1}}}

{=(COMMENT):Full Link No Playlist VidID}
{=(fl):{and({in(watch?v=):{vidlink}}==true|{in(&list):{vidlink}}==false):{vidlink(2):watch?v=}}}

{=(COMMENT):Full Link Playlist VidID}
{=(flc):{if({in(watch?v=):{vidlink}}==true):{vidlink(2):watch?v=}}}
{=(fll):{and({in(&list):{flc}}==true|{in(&list):{vidlink}}==true):{flc(1):&list}}}

{=(COMMENT):Short Link No Playlist VidID}
{=(sl):{and({in(youtu.be):{vidlink}}==true|{in(?list):{vidlink}}==false):{replace(http,):{replace(https,):{replace(://youtu.be/,):{vidlink(1):?list=}}}}}}

{=(COMMENT):Short Link Playlist VidID}
{=(slc):{if({in(youtu.be):{vidlink}}==true):{vidlink(4):/}}}
{=(sll):{and({in(?list):{slc}}==true|{in(?list):{vidlink}}==true):{slc(1):?list}}}

{=(COMMENT):Conditionally grabs the corresponding video ID.}
{=(vidid):{fl}{fll}{sl}{sll}}

{=(COMMENT):Optional quality/size parameter.}
{=(sizes):default maxresdefault mqdefault hqdefault sddefault}
{=(default.size):maxresdefault}

{=(size):{if({index({list(2):{join(~):0 {args}}}):{sizes}}==-1):{default.size}|{list(2):{join(~):0 {args}}}}}

{=(url):https://i.ytimg.com/vi/{vidid}/{size}.jpg}


{=(instructions):A quality/size parameter can be specified after the link among the ones below (defaults to `maxresdefault`):
`{join(`, `):{sizes}}`

*__Note:__ If your video doesn't have a 720p quality, you **will have** to specify a size that's different from `maxresdefault`.*

Usage:```css
{prefix}{tagname} [link] <optional quality/size>
```Example:```css
{prefix}{tagname} https://youtu.be/016hDf3bXgE mqdefault
```}

{=(COMMENT):Checks for invalid links and displays an error message without a DL Link.}
{=(error):{if({vidid}==):true|false}}
{=(errorm):<a:AO_No:613463514501349386> Invalid YouTube Video Link provided. Try again with a **valid link.**

{instructions}}

{=(COMMENT):Message to display when the user provided no argument.}
{=(noargs):Get the thumbnail from any [YouTube](https://www.youtube.com/) video from its link.
Allows for both full and shortened links to videos (even those in playlists).

{instructions}}

{=(ytemo):<:YouTube:733866137175195699>}

{=(em.name):Requested by {user(name)}}
{=(em.name_url):{replace(.gif,.png):{user(avatar)}}}
{=(em.title):{ytemo} YouTube Thumbnail}
{=(em.thumbnail):{if({error}==false):{url}}}

{=(output):[Video Link]({1} "YouTube Link you've given") │ [Thumbnail Link]({url} "Output Video Thumbnail from your link")}

{=(em.desc):{if(=={1}):{noargs}|{if({error}==true):{errorm}|{output}}}}
{=(em.footer):{if({error}==false):{prefix}{tagname} [link] <optional quality/size>}}

{delete}

Embed

1 line
{"color": 16711680, "image": {"url": "{em.thumbnail}"}, "title": "{em.title}", "author": {"name": "{em.name}", "icon_url": "{em.name_url}"}, "footer": {"text": "{em.footer}"}, "description": "{em.desc}"}
Raw JSON
{
  "id": 488495,
  "created_at": "2020-12-17T10:31:49.000Z",
  "tag_name": "yti",
  "nsfw": false,
  "owner_id": "149926720114262016",
  "uses": 82,
  "description": "YouTube Thumbnail Retriever\nby Asty'#8926\n\nGet the thumbnail of any YouTube video from its link!\n\n**Includes:**\n• Different error message when no argument or an invalid link have been specified\n• Works with any YouTube video link for as long as it's valid (full, shortened, videos in playlists, with or without timestamp)\n• The ability to choose the output quality/size among those available from YouTube\n\nPreview in action: https://i.imgur.com/sfLpMVY.png",
  "restricted": false,
  "shared": true,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "314660900302749696",
  "sharer": "149926720114262016",
  "content": "{=(COMMENT):Your tag settings. Put your server's main prefix and the name of this tag.\nWill be displayed in the command's instructions.}\n{=(prefix):!}\n{=(tagname):yti}\n\n{=(vidlink):{if({in(?t=):{1}}==true):{args(1):?t=}|{1}}}\n\n{=(COMMENT):Full Link No Playlist VidID}\n{=(fl):{and({in(watch?v=):{vidlink}}==true|{in(&list):{vidlink}}==false):{vidlink(2):watch?v=}}}\n\n{=(COMMENT):Full Link Playlist VidID}\n{=(flc):{if({in(watch?v=):{vidlink}}==true):{vidlink(2):watch?v=}}}\n{=(fll):{and({in(&list):{flc}}==true|{in(&list):{vidlink}}==true):{flc(1):&list}}}\n\n{=(COMMENT):Short Link No Playlist VidID}\n{=(sl):{and({in(youtu.be):{vidlink}}==true|{in(?list):{vidlink}}==false):{replace(http,):{replace(https,):{replace(://youtu.be/,):{vidlink(1):?list=}}}}}}\n\n{=(COMMENT):Short Link Playlist VidID}\n{=(slc):{if({in(youtu.be):{vidlink}}==true):{vidlink(4):/}}}\n{=(sll):{and({in(?list):{slc}}==true|{in(?list):{vidlink}}==true):{slc(1):?list}}}\n\n{=(COMMENT):Conditionally grabs the corresponding video ID.}\n{=(vidid):{fl}{fll}{sl}{sll}}\n\n{=(COMMENT):Optional quality/size parameter.}\n{=(sizes):default maxresdefault mqdefault hqdefault sddefault}\n{=(default.size):maxresdefault}\n\n{=(size):{if({index({list(2):{join(~):0 {args}}}):{sizes}}==-1):{default.size}|{list(2):{join(~):0 {args}}}}}\n\n{=(url):https://i.ytimg.com/vi/{vidid}/{size}.jpg}\n\n\n{=(instructions):A quality/size parameter can be specified after the link among the ones below (defaults to `maxresdefault`):\n`{join(`, `):{sizes}}`\n\n*__Note:__ If your video doesn't have a 720p quality, you **will have** to specify a size that's different from `maxresdefault`.*\n\nUsage:```css\n{prefix}{tagname} [link] <optional quality/size>\n```Example:```css\n{prefix}{tagname} https://youtu.be/016hDf3bXgE mqdefault\n```}\n\n{=(COMMENT):Checks for invalid links and displays an error message without a DL Link.}\n{=(error):{if({vidid}==):true|false}}\n{=(errorm):<a:AO_No:613463514501349386> Invalid YouTube Video Link provided. Try again with a **valid link.**\n\n{instructions}}\n\n{=(COMMENT):Message to display when the user provided no argument.}\n{=(noargs):Get the thumbnail from any [YouTube](https://www.youtube.com/) video from its link.\nAllows for both full and shortened links to videos (even those in playlists).\n\n{instructions}}\n\n{=(ytemo):<:YouTube:733866137175195699>}\n\n{=(em.name):Requested by {user(name)}}\n{=(em.name_url):{replace(.gif,.png):{user(avatar)}}}\n{=(em.title):{ytemo} YouTube Thumbnail}\n{=(em.thumbnail):{if({error}==false):{url}}}\n\n{=(output):[Video Link]({1} \"YouTube Link you've given\") │ [Thumbnail Link]({url} \"Output Video Thumbnail from your link\")}\n\n{=(em.desc):{if(=={1}):{noargs}|{if({error}==true):{errorm}|{output}}}}\n{=(em.footer):{if({error}==false):{prefix}{tagname} [link] <optional quality/size>}}\n\n{delete}",
  "embed": "{\"color\": 16711680, \"image\": {\"url\": \"{em.thumbnail}\"}, \"title\": \"{em.title}\", \"author\": {\"name\": \"{em.name}\", \"icon_url\": \"{em.name_url}\"}, \"footer\": {\"text\": \"{em.footer}\"}, \"description\": \"{em.desc}\"}",
  "last_fetched": "2026-10-20T23:31:47.266Z"
}