dir
Privateunrated
Content
319 lines{=(COMMENT):--- USER SETTINGS AND CONFIGURATION ---}
{=(COMMENT):Your preferred server prefix and this tag name.}
{=(prefix):!}
{=(tagName):dir}
{=(tag):{prefix}{tagName} [<path>|help]}
{=(COMMENT):Word used as the default "root" folder. I personally like "root" because it is generally what it is in consoles, but I let you customize the default directory's path if you want.}
{=(rootWord):root}
{=(COMMENT):Top left icon next to the console name.}
{=(terminalIcon):https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/GNOME_Terminal_icon_2019.svg/1200px-GNOME_Terminal_icon_2019.svg.png}
{=(COMMENT):Console name at the top. Can be custom; although I like it as the server name personally.}
{=(consoleName):{server}}
{=(COMMENT):Message to display at the top when the specified path points to no detected folder or file.}
{=(pathNotRecognized):β οΈ Path not recognized. Try {prefix}{tagName} help}
{=(COMMENT):Thumbnail and default terminal background image. I don't recommend changing them but you have the option to.}
{=(actionButtons):https://i.imgur.com/CeoKgGy.png}
{=(terminalCmdLine):https://i.imgur.com/DqCNHu0.gif}
{=(COMMENT):Folder emojis}
{=(e.rootFolder):π}
{=(e.folder):<:carlfold:839083749978669096>}
{=(e.folder):π}
{=(COMMENT):Terminal Command Line Image - Text Overlay Settings}
{=(terminalFont):Roboto Mono}
{=(terminalFontSize):12}
{=(COMMENT):Optional addition path prefix, that includes your server name and a HDD letter, such as D:/DiscordCloud/}
{=(HDDPath):D:/{join():{server}}}
{=(COMMENT):Put "true" or "yes" below if you want the above HDD path to be included in the displayed path.}
{=(shouldDisplayServerInPath):true}
{=(COMMENT):--- CREATED FILES ---
Each file is a separate variable holding the content of your choice.
Each folder's variable name has the prefix "fl-" and a file extension as it's suffix.
Once a file is created, if you want it to actually be in any folder at all (even in root), put its name in the folder's variable of your choice in the folders section below this files section.}
{=(fl-avatar.png):{replace(.gif,.png):{replace(.webp,.png):{user(avatar)}}}}
{=(fl-wallpaper.jpg):https://i.imgur.com/0l0ZBCm.png}
{=(fl-linkle.gif):https://66.media.tumblr.com/0e7a2a5fea1d8f6549d461177fa36ea9/tumblr_nz7k6e3paE1ursewko1_640.gif}
{=(fl-photo.png):https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/250px-Image_created_with_a_mobile_phone.png}
{=(fl-README.md):**What is this?**
READMEs are meant to be READ, OKAY?
I don't know, are you READING me right NOW?
Why is your brain making you SCREAM in your head in front of your SCREEN? Just because some letters are bigger than others...
That's such a [#SocialConstruct](https://twitter.com/hashtag/socialconstruct).
}
{=(fl-index.html):```html
<div class="container">
<h4>Tired of your SLOW computer?</h4>
<button class="btn">Buy More RAM</button>
</div>
```}
{=(fl-app.js):```js
/* who */ let theDogs = out() // WHO? WHO!?
```}
{=(fl-styles.css):```css
:root {
--background-primary: hsl(235 19 13 / 1);
--text-primary: hsl(0 0 87 / 1);
}
*, ::before, ::after {
box-sizing: border-box;
padding: 0;
margin: 0;
}
body {
display: grid;
place-items: center;
background-color: var(--background-primary);
color: var(--text-primary);
}
```}
{=(fl-shapeofcolor.mp3):[Intervals - The Shape of Colour (Full Album)](https://youtu.be/inyyVlm6mSQ) πΈ}
{=(fl-lorem.txt):Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}
{=(COMMENT):--- CREATED FOLDERS ---
Each folder is a separate variable holding other folders and/or files.
Each folder's variable name has the prefix "fd-" and no particular suffix.
Once a folder is created, put its name (with the "fd-" prefix) in the folder's variable of your choice for it to actually be displayed.}
{=(fd-subimg):fl-photo.png}
{=(fd-images):fd-subimg fl-avatar.png fl-linkle.gif fl-wallpaper.jpg}
{=(fd-intervals):fl-shapeofcolor.mp3}
{=(fd-music):fd-intervals}
{=(fd-project):fl-app.js fl-index.html fl-styles.css}
{=(fd-webdev):fd-project}
{=(fd-root):fd-images fd-music fd-webdev fl-lorem.txt fl-README.md}
{=(COMMENT):--- Beginning of the actual source code. ---
Avoid touching things if you don't know what you're doing!}
{=(largs):{lower:{args}}}
{=(jargs):{join(/):{args}}}
{=(COMMENT):Convenient aliases for me to reuse often.}
{=(r):replace}
{=(ue):urlencode}
{=(pl):$%&}
{=(nl):
}
{=(l1):{{r}({HDDPath}/,):{{r}({rootWord}/,):{list(0):{jargs}}}}}
{=(COMMENT):Ensuring the input doesn't *start* or *end* with a forward slash to avoid issues.}
{=(l1):{{r}({pl},):{{r}(/{pl},):{{r}({pl}/,):{pl}{l1}{pl}}}}}
{=(l2):{list(1):{jargs}}}
{=(subcommands):search cd root help ls mkdir touch mv}
{=(isSubcommand):{contains({l1}):{subcommands}}}
{=(COMMENT):Checks if the input was only a file name and nothing else
!dir text.txt}
{=(COMMENT):Very first word before a slash character. Returns a file or folder name from the input.
!dir >images</subimg}
{=(wordFirst):{{r}({args},{l1}):{l1(1):/}}}
{=(isOnlyFile):{in(.):{wordFirst}}}
{=(prefixFirst):{if({isOnlyFile}==true):fl-|fd-}}
{=(COMMENT):Index at which the first word appears in root. -1 if not in root.}
{=(indexFirst):{index({prefixFirst}{wordFirst}):! {fd-root}}}
{=(COMMENT):Returns the content (files and folders) in the first specified folder, or the file if it was a file.}
{=(insideFirst):{if({indexFirst}==-1):{fd-root}|{{fd-root({indexFirst})}}}}
{=(COMMENT):Second word.
!dir images/>image.png<
}
{=(COMMENT):Is there any sub file or folder willing to be accessed?}
{=(wordSecond):{{r}({args},{l1}):{l1(2):/}}}
{=(isSecondFile):{in(.):{wordSecond}}}
{=(prefixSecond):{if({isSecondFile}==true):fl-|fd-}}
{=(indexSecond):{index({prefixSecond}{wordSecond}):! {insideFirst}}}
{=(insideSecond):{if({indexSecond}==-1):{insideFirst}|{{insideFirst({indexSecond})}}}}
{=(COMMENT):Third word.
!dir images/subimg/>photo.png<
}
{=(wordThird):{{r}({args},{l1(0):/}):{l1(3):/}}}
{=(isThirdFile):{in(.):{wordThird}}}
{=(COMMENT):If first and second exist, then third HAS to be a file, because I'm not allowing for any more sub branch access.}
{=(prefixThird):fl-}
{=(indexThird):{index({prefixThird}{wordThird}):! {insideSecond}}}
{=(insideThird):{if({indexThird}==-1):{insideSecond}|{{insideSecond({indexThird})}}}}
{=(COMMENT):Returns true if the last detected file is an image or not.}
{=(isLastImage):{in(true):{in(.png):{wordThird}} {in(.jpg):{wordThird}} {in(.jpeg):{wordThird}} {in(.gif):{wordThird}}}}
{=(COMMENT):Returns true if the current viewing directory is root.}
{=(isInRoot):{contains(-1):{indexFirst}}}
{=(currentFolder):{if({isInRoot}==true):{rootWord}|{secondWord}}}
{=(currentFile):{if({isInRoot}==true):|{if({isThirdFile}==true):/{wordThird}|{if({isSecondFile}==true):/{wordSecond}|{if({isOnlyFile}==true):/{wordFirst}|}}}}}
{=(foldersPath):{if({isInRoot}==true):|{if({isOnlyFile}==true):|{if({wordFirst}=={wordSecond}):{wordFirst}|{join(/):{if({prefixFirst}==fd-):{wordFirst}} {if({prefixSecond}==fd-):{wordSecond}}}}}}}
{=(serverPath):{any({shouldDisplayServerInPath}==true|{shouldDisplayServerInPath}==yes):{HDDPath}/}}
{=(fullPath):{{r}({pl},):{{r}({pl}/,):{{r}(/{pl},):{pl}{foldersPath}{currentFile}{pl}}}}}
{=(fullPath):{if(=={fullPath}):{if(!={l1}):{pathNotRecognized}{nl}}{rootWord}|{fullPath}}}
{=(e.blankFile):<:dirblank:901548114408800327>}
{=(COMMENT):Emoji for each file extension}
{=(e-.{currentFile(2):.}):{e.blankFile}}
{=(COMMENT):Images emoji to display next to a file when viewing it.}
{=(COMMENT):Image files}
{=(e-.png)::frame_photo:}
{=(e-.jpg):{e-.png}}
{=(e-.jpeg):{e-.png}}
{=(e-.gif):<:dirgif:901580518745845820>}
{=(COMMENT):Text documents}
{=(e-.txt):π}
{=(e-.pdf):<:dirpdf:901546193992171683>}
{=(e-.md):<:dirmd:901547803828944957>}
{=(COMMENT):Music and video files}
{=(e-.mp3):π§}
{=(e-.mp4):ποΈ}
{=(COMMENT):Programming languages/Web dev}
{=(e-.html):<:dirhtml:901544111054684251>}
{=(e-.js):<:dirjs:901544124900077569>}
{=(e-.css):<:dircss:901544136530862140>}
{=(e-.config):βοΈ}
{=(COMMENT):Checks we currently are in a folder or not. If false, it means we are viewing a file instead.}
{=(isInAFolder):{if(=={currentFile}):true|false}}
{=(COMMENT):Returns the amount of files and folders in the current directory (if viewing a folder).}
{=(dirLength):{index({pl}):{insideThird} {pl}}}
{=(newDir):{{r}(fd-,. .):{insideThird}}}
{=(newDirLength):{index({pl}):{newDir} {pl}}}
{=(newFile):{{r}(fl-,. .):{insideThird}}}
{=(newFileLength):{index({pl}):{newFile} {pl}}}
{=(foldersCount):{m:trunc({newDirLength}-{dirLength})}}
{=(filesCount):{m:trunc({newFileLength}-{dirLength})}}
{=(COMMENT):Adds the word folder and file with a conditional s at the end if not 1 or 0}
{=(condFolderS):folder{{r}(false,s):{{r}(true,):{in(true):{contains(1):{foldersCount}} {contains(0):{foldersCount}}}}}}
{=(condFileS):file{{r}(false,s):{{r}(true,):{in(true):{contains(1):{filesCount}} {contains(0):{filesCount}}}}}}
{=(COMMENT):Counting the characters of the current file.}
{=(spacedContent):{{r}(, ):{insideThird}}}
{=(contentCharacterCount):{index({pl}):{spacedContent(2+)} {pl}}}
{=(contentWordsCount):{index({pl}):{insideThird} {pl}}}
{=(contentSpacesCount):{m:trunc({contentWordsCount}-1)}}
{=(contentCharacterCount):{m:trunc({contentCharacterCount}+{contentSpacesCount})}}
{=(COMMENT):Formats the string.}
{=(formatCount):Viewing {foldersCount} {condFolderS} and {filesCount} {condFileS}.}
{=(clPrefix):https://res.cloudinary.com/demo/image/fetch}
{=(formatCharacterCount):{contentCharacterCount} characters in file.}
{=(comma):%2C %252C}
{=(slash):%252F}
{=(terminalCondText):{{ue}:{if({isInAFolder}==true):{formatCount}|{formatCharacterCount}}}}
{=(clTextOverlay):l_text:{{ue}:{terminalFont}}_{terminalFontSize}:{terminalCondText}}
{=(terminalCmdLineText):{clPrefix}/{clTextOverlay},co_white/fl_layer_apply,g_west,x_25/https://i.imgur.com/DqCNHu0.gif}
{=(COMMENT):Absolute wizardry, that uses a tricky right-to-left special character to move the file extension's emoji at the beginning of each file name's line in a folder.}
{=(rtl):β«}
{=(modified):{rtl}{{r}( , {nl}{rtl}):{insideThird}} }
{=(wizardry):>>> {{r}(fl-,):{{r}({rtl}fd-,{e.folder} ):{{r}(.config ,.config {e-.config}):{{r}(.css ,.css {e-.css}):{{r}(.js ,.js {e-.js}):{{r}(.html ,.html {e-.html}):{{r}(.mp4 ,.mp4 {e-.mp4}):{{r}(.mp3 ,.mp3 {e-.mp3}):{{r}(.md ,.md {e-.md}):{{r}(.pdf ,.pdf {e-.pdf}):{{r}(.txt ,.txt {e-.txt}):{{r}(.gif ,.gif {e-.gif}):{{r}(.jpeg ,.jpeg {e-.jpeg}):{{r}(.jpg ,.jpg {e-.jpg}):{{r}(.png ,.png {e-.png}):{modified}}}}}}}}}}}}}}}}}
{=(COMMENT):Ensures it only formats properly the returned content when in a folder.}
{=(formattedInsideDesc):{if({isInAFolder}==true):{wizardry}|{insideThird}}}
{=(condFileEmoji):{if({isInAFolder}==false):{e-.{currentFile(2):.}}} }
{=(COMMENT):Output and Embed Management.}
{=(em.description):{condFileEmoji}`{fullPath}`
{if({isLastImage}==false):{formattedInsideDesc}}}
{=(em.image):{if({isLastImage}==true):{insideThird}|{terminalCmdLineText}}}
{=(em.footer):Logged as {user(name)}}
{=(em.footerIcon):{{r}(.gif,.png):{user(avatar)}}}
{embed(color):#2f3136}
{=(debug):__Debug__
Input: `{l1}`
**First**
wordFirst: {wordFirst}
isOnlyFile: `{isOnlyFile}`
prefixFirst: `{prefixFirst}`
indexFirst: `{indexFirst}`
insideFirst: ```{join(
):{insideFirst}}```
**Second**
wordSecond: {wordSecond}
isSecondFile: `{isSecondFile}`
prefixSecond: `{prefixSecond}`
indexSecond: `{indexSecond}`
insideSecond: ```{join(
):{insideSecond}}```
**Third**
wordThird: {wordThird}
isThirdFile: `{isThirdFile}`
prefixThird: `{prefixThird}`
indexThird: `{indexThird}`
insideThird: ```{join(
):{insideThird}}```
isLastImage: `{isLastImage}`
isInRoot (first index -1): `{isInRoot}`
currentFile: `{currentFile}`
}Embed
1 line{"color": 5198940, "image": {"url": "{em.image}"}, "author": {"name": "{consoleName}", "icon_url": "{terminalIcon}"}, "footer": {"text": "{em.footer}", "icon_url": "{em.footerIcon}"}, "thumbnail": {"url": "{actionButtons}"}, "description": "{em.description}"}Raw JSON
{
"id": 1118276,
"created_at": "2021-10-22T03:12:54.000Z",
"tag_name": "dir",
"nsfw": false,
"owner_id": "149926720114262016",
"uses": 368,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "314660900302749696",
"sharer": "149926720114262016",
"content": "{=(COMMENT):--- USER SETTINGS AND CONFIGURATION ---}\n{=(COMMENT):Your preferred server prefix and this tag name.}\n{=(prefix):!}\n{=(tagName):dir}\n{=(tag):{prefix}{tagName} [<path>|help]}\n\n{=(COMMENT):Word used as the default \"root\" folder. I personally like \"root\" because it is generally what it is in consoles, but I let you customize the default directory's path if you want.}\n{=(rootWord):root}\n\n{=(COMMENT):Top left icon next to the console name.}\n{=(terminalIcon):https://upload.wikimedia.org/wikipedia/commons/thumb/d/da/GNOME_Terminal_icon_2019.svg/1200px-GNOME_Terminal_icon_2019.svg.png}\n{=(COMMENT):Console name at the top. Can be custom; although I like it as the server name personally.}\n{=(consoleName):{server}}\n\n{=(COMMENT):Message to display at the top when the specified path points to no detected folder or file.}\n{=(pathNotRecognized):β οΈ Path not recognized. Try {prefix}{tagName} help}\n\n{=(COMMENT):Thumbnail and default terminal background image. I don't recommend changing them but you have the option to.}\n{=(actionButtons):https://i.imgur.com/CeoKgGy.png}\n{=(terminalCmdLine):https://i.imgur.com/DqCNHu0.gif}\n\n{=(COMMENT):Folder emojis}\n{=(e.rootFolder):π}\n{=(e.folder):<:carlfold:839083749978669096>}\n{=(e.folder):π}\n\n{=(COMMENT):Terminal Command Line Image - Text Overlay Settings}\n{=(terminalFont):Roboto Mono}\n{=(terminalFontSize):12}\n\n{=(COMMENT):Optional addition path prefix, that includes your server name and a HDD letter, such as D:/DiscordCloud/}\n{=(HDDPath):D:/{join():{server}}}\n\n{=(COMMENT):Put \"true\" or \"yes\" below if you want the above HDD path to be included in the displayed path.}\n{=(shouldDisplayServerInPath):true}\n\n{=(COMMENT):--- CREATED FILES ---\nEach file is a separate variable holding the content of your choice.\nEach folder's variable name has the prefix \"fl-\" and a file extension as it's suffix.\nOnce a file is created, if you want it to actually be in any folder at all (even in root), put its name in the folder's variable of your choice in the folders section below this files section.}\n{=(fl-avatar.png):{replace(.gif,.png):{replace(.webp,.png):{user(avatar)}}}}\n{=(fl-wallpaper.jpg):https://i.imgur.com/0l0ZBCm.png}\n\n{=(fl-linkle.gif):https://66.media.tumblr.com/0e7a2a5fea1d8f6549d461177fa36ea9/tumblr_nz7k6e3paE1ursewko1_640.gif}\n\n{=(fl-photo.png):https://upload.wikimedia.org/wikipedia/commons/thumb/b/b6/Image_created_with_a_mobile_phone.png/250px-Image_created_with_a_mobile_phone.png}\n\n{=(fl-README.md):**What is this?**\n\nREADMEs are meant to be READ, OKAY?\nI don't know, are you READING me right NOW?\n\nWhy is your brain making you SCREAM in your head in front of your SCREEN? Just because some letters are bigger than others...\nThat's such a [#SocialConstruct](https://twitter.com/hashtag/socialconstruct).\n}\n\n{=(fl-index.html):```html\n<div class=\"container\">\n\t<h4>Tired of your SLOW computer?</h4>\n\t<button class=\"btn\">Buy More RAM</button>\n</div>\n```}\n\n{=(fl-app.js):```js\n/* who */ let theDogs = out() // WHO? WHO!?\n```}\n\n{=(fl-styles.css):```css\n:root {\n\t--background-primary: hsl(235 19 13 / 1);\n\t--text-primary: hsl(0 0 87 / 1);\n}\n\n*, ::before, ::after {\n\tbox-sizing: border-box;\n\tpadding: 0;\n\tmargin: 0;\n}\n\nbody {\n\tdisplay: grid;\n\tplace-items: center;\n\t\n\tbackground-color: var(--background-primary);\n\tcolor: var(--text-primary);\n}\n```}\n\n{=(fl-shapeofcolor.mp3):[Intervals - The Shape of Colour (Full Album)](https://youtu.be/inyyVlm6mSQ) πΈ}\n\n{=(fl-lorem.txt):Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.}\n\n{=(COMMENT):--- CREATED FOLDERS ---\nEach folder is a separate variable holding other folders and/or files.\nEach folder's variable name has the prefix \"fd-\" and no particular suffix.\nOnce a folder is created, put its name (with the \"fd-\" prefix) in the folder's variable of your choice for it to actually be displayed.}\n{=(fd-subimg):fl-photo.png}\n\n{=(fd-images):fd-subimg fl-avatar.png fl-linkle.gif fl-wallpaper.jpg}\n\n{=(fd-intervals):fl-shapeofcolor.mp3}\n\n{=(fd-music):fd-intervals}\n\n{=(fd-project):fl-app.js fl-index.html fl-styles.css}\n\n{=(fd-webdev):fd-project}\n\n{=(fd-root):fd-images fd-music fd-webdev fl-lorem.txt fl-README.md}\n\n\n{=(COMMENT):--- Beginning of the actual source code. ---\nAvoid touching things if you don't know what you're doing!}\n{=(largs):{lower:{args}}}\n{=(jargs):{join(/):{args}}}\n\n{=(COMMENT):Convenient aliases for me to reuse often.}\n{=(r):replace}\n{=(ue):urlencode}\n{=(pl):$%&}\n{=(nl):\n}\n\n{=(l1):{{r}({HDDPath}/,):{{r}({rootWord}/,):{list(0):{jargs}}}}}\n{=(COMMENT):Ensuring the input doesn't *start* or *end* with a forward slash to avoid issues.}\n{=(l1):{{r}({pl},):{{r}(/{pl},):{{r}({pl}/,):{pl}{l1}{pl}}}}}\n{=(l2):{list(1):{jargs}}}\n\n{=(subcommands):search cd root help ls mkdir touch mv}\n\n{=(isSubcommand):{contains({l1}):{subcommands}}}\n\n\n{=(COMMENT):Checks if the input was only a file name and nothing else\n!dir text.txt}\n\n{=(COMMENT):Very first word before a slash character. Returns a file or folder name from the input.\n!dir >images</subimg}\n{=(wordFirst):{{r}({args},{l1}):{l1(1):/}}}\n\n{=(isOnlyFile):{in(.):{wordFirst}}}\n\n{=(prefixFirst):{if({isOnlyFile}==true):fl-|fd-}}\n\n{=(COMMENT):Index at which the first word appears in root. -1 if not in root.}\n{=(indexFirst):{index({prefixFirst}{wordFirst}):! {fd-root}}}\n{=(COMMENT):Returns the content (files and folders) in the first specified folder, or the file if it was a file.}\n{=(insideFirst):{if({indexFirst}==-1):{fd-root}|{{fd-root({indexFirst})}}}}\n\n{=(COMMENT):Second word.\n!dir images/>image.png<\n}\n{=(COMMENT):Is there any sub file or folder willing to be accessed?}\n{=(wordSecond):{{r}({args},{l1}):{l1(2):/}}}\n\n{=(isSecondFile):{in(.):{wordSecond}}}\n\n{=(prefixSecond):{if({isSecondFile}==true):fl-|fd-}}\n\n{=(indexSecond):{index({prefixSecond}{wordSecond}):! {insideFirst}}}\n\n{=(insideSecond):{if({indexSecond}==-1):{insideFirst}|{{insideFirst({indexSecond})}}}}\n\n{=(COMMENT):Third word.\n!dir images/subimg/>photo.png<\n}\n{=(wordThird):{{r}({args},{l1(0):/}):{l1(3):/}}}\n\n{=(isThirdFile):{in(.):{wordThird}}}\n\n{=(COMMENT):If first and second exist, then third HAS to be a file, because I'm not allowing for any more sub branch access.}\n{=(prefixThird):fl-}\n\n{=(indexThird):{index({prefixThird}{wordThird}):! {insideSecond}}}\n\n{=(insideThird):{if({indexThird}==-1):{insideSecond}|{{insideSecond({indexThird})}}}}\n\n{=(COMMENT):Returns true if the last detected file is an image or not.}\n{=(isLastImage):{in(true):{in(.png):{wordThird}} {in(.jpg):{wordThird}} {in(.jpeg):{wordThird}} {in(.gif):{wordThird}}}}\n\n{=(COMMENT):Returns true if the current viewing directory is root.}\n{=(isInRoot):{contains(-1):{indexFirst}}}\n\n{=(currentFolder):{if({isInRoot}==true):{rootWord}|{secondWord}}}\n{=(currentFile):{if({isInRoot}==true):|{if({isThirdFile}==true):/{wordThird}|{if({isSecondFile}==true):/{wordSecond}|{if({isOnlyFile}==true):/{wordFirst}|}}}}}\n\n{=(foldersPath):{if({isInRoot}==true):|{if({isOnlyFile}==true):|{if({wordFirst}=={wordSecond}):{wordFirst}|{join(/):{if({prefixFirst}==fd-):{wordFirst}} {if({prefixSecond}==fd-):{wordSecond}}}}}}}\n\n{=(serverPath):{any({shouldDisplayServerInPath}==true|{shouldDisplayServerInPath}==yes):{HDDPath}/}}\n\n{=(fullPath):{{r}({pl},):{{r}({pl}/,):{{r}(/{pl},):{pl}{foldersPath}{currentFile}{pl}}}}}\n\n{=(fullPath):{if(=={fullPath}):{if(!={l1}):{pathNotRecognized}{nl}}{rootWord}|{fullPath}}}\n\n{=(e.blankFile):<:dirblank:901548114408800327>}\n\n{=(COMMENT):Emoji for each file extension}\n{=(e-.{currentFile(2):.}):{e.blankFile}}\n\n{=(COMMENT):Images emoji to display next to a file when viewing it.}\n{=(COMMENT):Image files}\n{=(e-.png)::frame_photo:}\n{=(e-.jpg):{e-.png}}\n{=(e-.jpeg):{e-.png}}\n{=(e-.gif):<:dirgif:901580518745845820>}\n\n{=(COMMENT):Text documents}\n{=(e-.txt):π}\n{=(e-.pdf):<:dirpdf:901546193992171683>}\n{=(e-.md):<:dirmd:901547803828944957>}\n\n{=(COMMENT):Music and video files}\n{=(e-.mp3):π§}\n{=(e-.mp4):ποΈ}\n\n{=(COMMENT):Programming languages/Web dev}\n{=(e-.html):<:dirhtml:901544111054684251>}\n{=(e-.js):<:dirjs:901544124900077569>}\n{=(e-.css):<:dircss:901544136530862140>}\n{=(e-.config):βοΈ}\n\n{=(COMMENT):Checks we currently are in a folder or not. If false, it means we are viewing a file instead.}\n{=(isInAFolder):{if(=={currentFile}):true|false}}\n\n{=(COMMENT):Returns the amount of files and folders in the current directory (if viewing a folder).}\n{=(dirLength):{index({pl}):{insideThird} {pl}}}\n\n{=(newDir):{{r}(fd-,. .):{insideThird}}}\n{=(newDirLength):{index({pl}):{newDir} {pl}}}\n\n{=(newFile):{{r}(fl-,. .):{insideThird}}}\n{=(newFileLength):{index({pl}):{newFile} {pl}}}\n\n{=(foldersCount):{m:trunc({newDirLength}-{dirLength})}}\n{=(filesCount):{m:trunc({newFileLength}-{dirLength})}}\n\n{=(COMMENT):Adds the word folder and file with a conditional s at the end if not 1 or 0}\n{=(condFolderS):folder{{r}(false,s):{{r}(true,):{in(true):{contains(1):{foldersCount}} {contains(0):{foldersCount}}}}}}\n{=(condFileS):file{{r}(false,s):{{r}(true,):{in(true):{contains(1):{filesCount}} {contains(0):{filesCount}}}}}}\n\n{=(COMMENT):Counting the characters of the current file.}\n{=(spacedContent):{{r}(, ):{insideThird}}}\n{=(contentCharacterCount):{index({pl}):{spacedContent(2+)} {pl}}}\n\n{=(contentWordsCount):{index({pl}):{insideThird} {pl}}}\n{=(contentSpacesCount):{m:trunc({contentWordsCount}-1)}}\n{=(contentCharacterCount):{m:trunc({contentCharacterCount}+{contentSpacesCount})}}\n\n{=(COMMENT):Formats the string.}\n{=(formatCount):Viewing {foldersCount} {condFolderS} and {filesCount} {condFileS}.}\n\n{=(clPrefix):https://res.cloudinary.com/demo/image/fetch}\n\n{=(formatCharacterCount):{contentCharacterCount} characters in file.}\n\n{=(comma):%2C %252C}\n{=(slash):%252F}\n\n{=(terminalCondText):{{ue}:{if({isInAFolder}==true):{formatCount}|{formatCharacterCount}}}}\n\n{=(clTextOverlay):l_text:{{ue}:{terminalFont}}_{terminalFontSize}:{terminalCondText}}\n\n{=(terminalCmdLineText):{clPrefix}/{clTextOverlay},co_white/fl_layer_apply,g_west,x_25/https://i.imgur.com/DqCNHu0.gif}\n\n\n{=(COMMENT):Absolute wizardry, that uses a tricky right-to-left special character to move the file extension's emoji at the beginning of each file name's line in a folder.}\n{=(rtl):β«}\n{=(modified):{rtl}{{r}( , {nl}{rtl}):{insideThird}} }\n{=(wizardry):>>> {{r}(fl-,):{{r}({rtl}fd-,{e.folder} ):{{r}(.config ,.config {e-.config}):{{r}(.css ,.css {e-.css}):{{r}(.js ,.js {e-.js}):{{r}(.html ,.html {e-.html}):{{r}(.mp4 ,.mp4 {e-.mp4}):{{r}(.mp3 ,.mp3 {e-.mp3}):{{r}(.md ,.md {e-.md}):{{r}(.pdf ,.pdf {e-.pdf}):{{r}(.txt ,.txt {e-.txt}):{{r}(.gif ,.gif {e-.gif}):{{r}(.jpeg ,.jpeg {e-.jpeg}):{{r}(.jpg ,.jpg {e-.jpg}):{{r}(.png ,.png {e-.png}):{modified}}}}}}}}}}}}}}}}}\n\n{=(COMMENT):Ensures it only formats properly the returned content when in a folder.}\n{=(formattedInsideDesc):{if({isInAFolder}==true):{wizardry}|{insideThird}}}\n\n{=(condFileEmoji):{if({isInAFolder}==false):{e-.{currentFile(2):.}}} }\n\n{=(COMMENT):Output and Embed Management.}\n{=(em.description):{condFileEmoji}`{fullPath}`\n{if({isLastImage}==false):{formattedInsideDesc}}}\n{=(em.image):{if({isLastImage}==true):{insideThird}|{terminalCmdLineText}}}\n{=(em.footer):Logged as {user(name)}}\n{=(em.footerIcon):{{r}(.gif,.png):{user(avatar)}}}\n{embed(color):#2f3136}\n\n\n{=(debug):__Debug__\nInput: `{l1}`\n\n**First**\nwordFirst: {wordFirst}\nisOnlyFile: `{isOnlyFile}`\n\nprefixFirst: `{prefixFirst}`\nindexFirst: `{indexFirst}`\ninsideFirst: ```{join(\n):{insideFirst}}```\n**Second**\nwordSecond: {wordSecond}\nisSecondFile: `{isSecondFile}`\n\nprefixSecond: `{prefixSecond}`\nindexSecond: `{indexSecond}`\n\ninsideSecond: ```{join(\n):{insideSecond}}```\n**Third**\nwordThird: {wordThird}\nisThirdFile: `{isThirdFile}`\n\nprefixThird: `{prefixThird}`\nindexThird: `{indexThird}`\n\ninsideThird: ```{join(\n):{insideThird}}```\n\nisLastImage: `{isLastImage}`\n\nisInRoot (first index -1): `{isInRoot}`\ncurrentFile: `{currentFile}`\n}",
"embed": "{\"color\": 5198940, \"image\": {\"url\": \"{em.image}\"}, \"author\": {\"name\": \"{consoleName}\", \"icon_url\": \"{terminalIcon}\"}, \"footer\": {\"text\": \"{em.footer}\", \"icon_url\": \"{em.footerIcon}\"}, \"thumbnail\": {\"url\": \"{actionButtons}\"}, \"description\": \"{em.description}\"}",
"last_fetched": "2026-10-20T17:51:48.674Z"
}