ship

Privateunrated

Content

96 lines
{=(COMMENT):Quick setup to adapt the command to your server's settings. (Prefix and command name)}
{=(prefix):!}
{=(tag.Name):lovecalc}

{=(COMMENT):The embed's side color. I set it to the user highest color by default. Change it as per your need. Make sure to include # before the hex code if you do decide to include one.}
{embed(color):{user(color)}}

{=(COMMENT):------Initialization------}
{=(COMMENT):Returns the current arguments length and checks if it equal to 1 or 2.}
{=(length):{index(&$):{args} &$}}
{=(COMMENT):Checks if the current arguments length is 1 or 2.}
{=(check.Length1):{if({length}==1):true|false}}
{=(check.Length2):{if({length}==2):true|false}}

{=(COMMENT):------Seed and Range Management------}
{=(COMMENT):Sets the seed's content to the two first arguments/mentions. Reminder: Seeds allow range and random blocks to always return the same content when the given seed is the same.}
{=(seed1):{1}}
{=(seed2):{2}}
{=(do.Seed):{if({check.One}==true):{seed1}|{if({check.Two}==true):{seed2}}}}
{=(COMMENT):Basic setup of the seeded range block.}
{=(number):{range:1-100}}

{=(COMMENT):------Outputs------}
{=(COMMENT):Carl-bot Emojis to display depending on the value of "number".}
{=(emojis):<:cbotneutral_face:676420694787096587> <:cbotface:676420695508647946> <:cbotgrinning:676420694694821899> <:cbotweary:676420694820651018> <:cbothearteyes:676420694715924500>}
{=(emoji):{if({number}<=19):{emojis(1)}|{if({number}<=39):{emojis(2)}|{if({number}<=59):{emojis(3)}|{if({number}<=79):{emojis(4)}|{if({number}<=100):{emojis(5)}}}}}}}


{=(COMMENT):Message to display when the user mentioned two people.}
{=(output.Two):Checking for compatibility between
{1} and {2}...
Result:  **`{number}% compatible`** {emoji}}

{=(COMMENT):Message to display when the user didn't mention anyone, showing them instructions on how to use the command properly.}
{=(error): Checking for compatibility between
{1} and {2}...
Result:  **`{number}% compatible`** {emoji}}
{=(COMMENT):Message to display when the user mentioned two people.}
{=(output.Two):Checking for compatibility between
{1} and {2}...
Result:  **`{number}% compatible`** {emoji}}




{=(COMMENT):Conditionally call the proper output according to the situation.}
{=(output):{if({check.One}==true):{output.One}|{if({check.Two}==true):{output.Two}|{all({check.Length1}==true|{in({user(id)}):{1}}==true):{yourself}|{all({check.Length2}==true|{1}=={2}|{in({user(id)}):{1}}==true):{yourself}|{all({check.Length2}==true|{1}=={2}):{same}|{error}}}}}}}

{=(COMMENT):Debug Outputs, only to test out mistakes and potential errors. To call when debugging.}
{=(output.Debug):__Debug:__
Current Args Length: **{length}**
Length check 1: **{check.Length1}**
Length check 2: **{check.Length2}**
Checks @@: **{check.At}**
Checks len1 && @: **{check.One}**
Checks len2 && @: **{check.Two}**
Seed 1: **{seed1}**
Seed 2: **{seed2}**
Seed to return: **{do.Seed}**
Actual range: **{number}**}

{=(comment):spaces names preserving spaces}
{=(uspc):{replace(, ):{replace( ,╬):{1}}}}
{=(tspc):{replace(, ):{replace( ,╬):{2}}}}

{=(comment):length checking}
{=(ulen):{index(end):{uspc} end}}
{=(tlen):{index(end):{tspc} end}}

{=(comment):finds the approximate middle of each name, taking into account the offset made during spacing}
{=(uhalf):{m:trunc(({ulen}+3)/2)}}
{=(thalf):{m:trunc(({tlen}+3)/2)}}

{=(vowels):a e i o u}
{=(comment):checks for vowel presence in the 3 characters centered around the middle character, in reverse order}
{=(ucchk):{contains({uspc({m:trunc({uhalf}+1)})}):{vowels}} {contains({uspc({uhalf})}):{vowels}}{if({m:{ulen}%2}!=0.0): {contains({uspc({m:trunc({uhalf}-1)})}):{vowels}}}}
{=(tcchk):{contains({tspc({m:trunc({thalf}+1)})}):{vowels}} {contains({tspc({thalf})}):{vowels}}{if({m:{tlen}%2}!=0.0): {contains({tspc({m:trunc({thalf}-1)})}):{vowels}}}}

{=(comment):checks for vowel presence in the 3 characters centered around the middle character, in regular order}
{=(uvchk):{if({m:{ulen}%2}!=0.0):{contains({uspc({m:trunc({uhalf}-1)})}):{vowels}} }{contains({uspc({uhalf})}):{vowels}} {contains({uspc({m:trunc({uhalf}+1)})}):{vowels}}}
{=(tvchk):{if({m:{tlen}%2}!=0.0):{contains({tspc({m:trunc({thalf}-1)})}):{vowels}} }{contains({tspc({thalf})}):{vowels}} {contains({tspc({m:trunc({thalf}+1)})}):{vowels}}}

{=(comment):finds the consonant split for the user and target; first character in reverse order that is not a vowel}
{=(ucsplt):{if({contains(false):{ucchk}}==true):{m:trunc({uhalf}+1-{index(false):{ucchk}})}|{uhalf}}}
{=(tcsplt):{if({contains(false):{tcchk}}==true):{m:trunc({thalf}+1-{index(false):{tcchk}})}|{thalf}}}

{=(comment):finds the vowel split for the user and target; first character in regular order that is a vowel}
{=(uvsplt):{if({contains(true):{uvchk}}==true):{m:trunc({uhalf}{if({m:{ulen}%2}!=0.0):-1}+{index(true):{uvchk}})}|{m:trunc(1+{uhalf})}}}
{=(tvsplt):{if({contains(true):{tvchk}}==true):{m:trunc({thalf}{if({m:{tlen}%2}!=0.0):-1}+{index(true):{tvchk}})}|{m:trunc(1+{thalf})}}}

{=(comment):puts the names together}
{=(comment):name1 is user/target, with user ending on last consonant in approx middle of name and target starting with first vowel in approx middle of name}
{=(comment):name2 is target/user, with target ending on last consonant in approx middle of name and user starting with first vowel in approx middle of name}
{=(name1):{replace(╬, ):{join():{uspc(+{ucsplt})}{tspc({tvsplt}+)}}}}
{=(name2):{replace(╬, ):{join():{tspc(+{tcsplt})}{uspc({uvsplt}+)}}}}

Embed

1 line
{"color": 5198940, "title": "{1} and {2}'s ship", "fields": [{"name": "Ship Name", "value": "{1} and {2}'s ship might be named:\n**{name1}**\nor\n**{name2}**", "inline": false}, {"name": "Love Calculator", "value": "{output}", "inline": false}], "footer": {"text": "{random: The ship has sailed..~ The ship has failed}"}, "thumbnail": {"url": "https://cdn.discordapp.com/emojis/425417024722829344.png?v=1"}}
Raw JSON
{
  "id": 339616,
  "created_at": "2020-09-20T14:59:24.000Z",
  "tag_name": "ship",
  "nsfw": false,
  "owner_id": "564454370863742997",
  "uses": 26,
  "description": null,
  "restricted": false,
  "shared": false,
  "deleted": false,
  "safe": "unrated",
  "hidden": false,
  "guild_id": "718697818742849576",
  "sharer": "564454370863742997",
  "content": "{=(COMMENT):Quick setup to adapt the command to your server's settings. (Prefix and command name)}\n{=(prefix):!}\n{=(tag.Name):lovecalc}\n\n{=(COMMENT):The embed's side color. I set it to the user highest color by default. Change it as per your need. Make sure to include # before the hex code if you do decide to include one.}\n{embed(color):{user(color)}}\n\n{=(COMMENT):------Initialization------}\n{=(COMMENT):Returns the current arguments length and checks if it equal to 1 or 2.}\n{=(length):{index(&$):{args} &$}}\n{=(COMMENT):Checks if the current arguments length is 1 or 2.}\n{=(check.Length1):{if({length}==1):true|false}}\n{=(check.Length2):{if({length}==2):true|false}}\n\n{=(COMMENT):------Seed and Range Management------}\n{=(COMMENT):Sets the seed's content to the two first arguments/mentions. Reminder: Seeds allow range and random blocks to always return the same content when the given seed is the same.}\n{=(seed1):{1}}\n{=(seed2):{2}}\n{=(do.Seed):{if({check.One}==true):{seed1}|{if({check.Two}==true):{seed2}}}}\n{=(COMMENT):Basic setup of the seeded range block.}\n{=(number):{range:1-100}}\n\n{=(COMMENT):------Outputs------}\n{=(COMMENT):Carl-bot Emojis to display depending on the value of \"number\".}\n{=(emojis):<:cbotneutral_face:676420694787096587> <:cbotface:676420695508647946> <:cbotgrinning:676420694694821899> <:cbotweary:676420694820651018> <:cbothearteyes:676420694715924500>}\n{=(emoji):{if({number}<=19):{emojis(1)}|{if({number}<=39):{emojis(2)}|{if({number}<=59):{emojis(3)}|{if({number}<=79):{emojis(4)}|{if({number}<=100):{emojis(5)}}}}}}}\n\n\n{=(COMMENT):Message to display when the user mentioned two people.}\n{=(output.Two):Checking for compatibility between\n{1} and {2}...\nResult:  **`{number}% compatible`** {emoji}}\n\n{=(COMMENT):Message to display when the user didn't mention anyone, showing them instructions on how to use the command properly.}\n{=(error): Checking for compatibility between\n{1} and {2}...\nResult:  **`{number}% compatible`** {emoji}}\n{=(COMMENT):Message to display when the user mentioned two people.}\n{=(output.Two):Checking for compatibility between\n{1} and {2}...\nResult:  **`{number}% compatible`** {emoji}}\n\n\n\n\n{=(COMMENT):Conditionally call the proper output according to the situation.}\n{=(output):{if({check.One}==true):{output.One}|{if({check.Two}==true):{output.Two}|{all({check.Length1}==true|{in({user(id)}):{1}}==true):{yourself}|{all({check.Length2}==true|{1}=={2}|{in({user(id)}):{1}}==true):{yourself}|{all({check.Length2}==true|{1}=={2}):{same}|{error}}}}}}}\n\n{=(COMMENT):Debug Outputs, only to test out mistakes and potential errors. To call when debugging.}\n{=(output.Debug):__Debug:__\nCurrent Args Length: **{length}**\nLength check 1: **{check.Length1}**\nLength check 2: **{check.Length2}**\nChecks @@: **{check.At}**\nChecks len1 && @: **{check.One}**\nChecks len2 && @: **{check.Two}**\nSeed 1: **{seed1}**\nSeed 2: **{seed2}**\nSeed to return: **{do.Seed}**\nActual range: **{number}**}\n\n{=(comment):spaces names preserving spaces}\n{=(uspc):{replace(, ):{replace( ,╬):{1}}}}\n{=(tspc):{replace(, ):{replace( ,╬):{2}}}}\n\n{=(comment):length checking}\n{=(ulen):{index(end):{uspc} end}}\n{=(tlen):{index(end):{tspc} end}}\n\n{=(comment):finds the approximate middle of each name, taking into account the offset made during spacing}\n{=(uhalf):{m:trunc(({ulen}+3)/2)}}\n{=(thalf):{m:trunc(({tlen}+3)/2)}}\n\n{=(vowels):a e i o u}\n{=(comment):checks for vowel presence in the 3 characters centered around the middle character, in reverse order}\n{=(ucchk):{contains({uspc({m:trunc({uhalf}+1)})}):{vowels}} {contains({uspc({uhalf})}):{vowels}}{if({m:{ulen}%2}!=0.0): {contains({uspc({m:trunc({uhalf}-1)})}):{vowels}}}}\n{=(tcchk):{contains({tspc({m:trunc({thalf}+1)})}):{vowels}} {contains({tspc({thalf})}):{vowels}}{if({m:{tlen}%2}!=0.0): {contains({tspc({m:trunc({thalf}-1)})}):{vowels}}}}\n\n{=(comment):checks for vowel presence in the 3 characters centered around the middle character, in regular order}\n{=(uvchk):{if({m:{ulen}%2}!=0.0):{contains({uspc({m:trunc({uhalf}-1)})}):{vowels}} }{contains({uspc({uhalf})}):{vowels}} {contains({uspc({m:trunc({uhalf}+1)})}):{vowels}}}\n{=(tvchk):{if({m:{tlen}%2}!=0.0):{contains({tspc({m:trunc({thalf}-1)})}):{vowels}} }{contains({tspc({thalf})}):{vowels}} {contains({tspc({m:trunc({thalf}+1)})}):{vowels}}}\n\n{=(comment):finds the consonant split for the user and target; first character in reverse order that is not a vowel}\n{=(ucsplt):{if({contains(false):{ucchk}}==true):{m:trunc({uhalf}+1-{index(false):{ucchk}})}|{uhalf}}}\n{=(tcsplt):{if({contains(false):{tcchk}}==true):{m:trunc({thalf}+1-{index(false):{tcchk}})}|{thalf}}}\n\n{=(comment):finds the vowel split for the user and target; first character in regular order that is a vowel}\n{=(uvsplt):{if({contains(true):{uvchk}}==true):{m:trunc({uhalf}{if({m:{ulen}%2}!=0.0):-1}+{index(true):{uvchk}})}|{m:trunc(1+{uhalf})}}}\n{=(tvsplt):{if({contains(true):{tvchk}}==true):{m:trunc({thalf}{if({m:{tlen}%2}!=0.0):-1}+{index(true):{tvchk}})}|{m:trunc(1+{thalf})}}}\n\n{=(comment):puts the names together}\n{=(comment):name1 is user/target, with user ending on last consonant in approx middle of name and target starting with first vowel in approx middle of name}\n{=(comment):name2 is target/user, with target ending on last consonant in approx middle of name and user starting with first vowel in approx middle of name}\n{=(name1):{replace(╬, ):{join():{uspc(+{ucsplt})}{tspc({tvsplt}+)}}}}\n{=(name2):{replace(╬, ):{join():{tspc(+{tcsplt})}{uspc({uvsplt}+)}}}}\n",
  "embed": "{\"color\": 5198940, \"title\": \"{1} and {2}'s ship\", \"fields\": [{\"name\": \"Ship Name\", \"value\": \"{1} and {2}'s ship might be named:\\n**{name1}**\\nor\\n**{name2}**\", \"inline\": false}, {\"name\": \"Love Calculator\", \"value\": \"{output}\", \"inline\": false}], \"footer\": {\"text\": \"{random: The ship has sailed..~ The ship has failed}\"}, \"thumbnail\": {\"url\": \"https://cdn.discordapp.com/emojis/425417024722829344.png?v=1\"}}",
  "last_fetched": "2026-10-20T22:33:41.104Z"
}