temp
Privateunrated
Content
63 lines{=(COMMENT):**VARIABLE DEFINITIONS!***}
{=(COMMENT):sets the first arg to raw if it's a numerical value, and 2nd arg to type if it is F or C. **CREDIT FOR THIS CODE TO RAFFAEL.**}
{=(uargs):{upper:{args}}}
{=(spaced):{replace(&, ):{join(&):{replace(F, F ):{replace(C, C ):{uargs}}}}}}
{=(raw):{if({m:{spaced(1)}}=={m:{spaced(1)}/1}):{spaced(1)}}}
{=(type):{if({contains({spaced(2)}):F C}==true):{spaced(2)}}}
{=(ltype):{lower:{type}}}
{=(C2C):{m:round(10*{raw})/10}}
{=(F2F):{m:round(10*{raw})/10}}
{=(C2F):{m:round(10*(({raw}*9/5)+32))/10}}
{=(F2C):{m:round(10*(({raw}-32)*5/9))/10}}
{=(COMMENT):scale of how it feels, the Celsius temps that correspond, colors, and images. Allows dynamic colors and images in embed. **CREDIT FOR THIS CODE TO RAFFAEL.**}
{=(scale):0 5 10 17 23 28 50}
{=(colors):3399FF 66CCFF 33FFEE CCFFFF 22FFBB FFAA33 FF5500 FF0000}
{=(image):https://i.imgur.com/wmhquXi.png https://i.imgur.com/M844pcA.png https://i.imgur.com/bcPjDdn.png https://i.imgur.com/U6GQeXX.png https://i.imgur.com/d3H8xur.png https://i.imgur.com/BpLlJNH.png https://i.imgur.com/YyfCbef.png https://i.imgur.com/6Nwwxtj.png}
{=(comment):grabs the temp in C, uses sgns to determine where in the scale the temperature falls by looking for the first -1 that occurs. changes all 0's to -1's for simplicity and to be "downwards inclusive" (ie, 0C = freezing). **CREDIT FOR THIS CODE TO RAFF.**}
{=(cels):{{type}2C}}
{=(sgns):{replace(0,-1):1 {m:sgn({cels}-{scale(1)})} {m:sgn({cels}-{scale(2)})} {m:sgn({cels}-{scale(3)})} {m:sgn({cels}-{scale(4)})} {m:sgn({cels}-{scale(5)})} {m:sgn({cels}-{scale(6)})} {m:sgn({cels}-{scale(7)})} -1}}
{=(COMMENT):**SHARED EMBED FEATURES. Sets the footer and timestamp now for both embed outputs. You can delete these or edit them at will if you know what you're doing. NOTE: Make sure to delete the {user(avater)} out of the embed builder if you want to remove the footer.***}
{embed(timestamp):now}
{=(footer):{user}}
{=(COMMENT):***BEGIN GOOD EMBED FORMATTING. EDIT WITH CAUTION. PAY CLOSE ATTENTION TO COMMENTS.***}
{=(comment):*Title for a good conversion input. Uses a check to determine if user has input C or F. Please edit with caution to not break the check. I will not provide support if you break the code here*}
{=(goodtitle):{if({contains({ltype}):c}==true):{raw}°C in °F is|{raw}°F in °C is}}
{=(comment):*Color for the good embed in hexadecimal. Currently set to use a scale based on the temperature. Update to {user(color)} to have it match the color of the user's name or change to a hexadecimal code without the # sign to have it set to a single color.*}
{=(goodcolor):#{colors({index(-1):{sgns}})}}
{=(comment):*Image URL for the good embed thumbnail in the upper right corner. You can update this but it MUST be a direct URL. Do not edit if you don't know what that is.*}
{=(goodimg):{image({index(-1):{sgns}})}}
{=(COMMENT):***END GOOD EMBED FORMATTING.***}
{=(COMMENT):***BEGIN ERROR EMBED FORMATTING. EDIT WITH CAUTION. PAY CLOSE ATTENTION TO COMMENTS.***}
{=(comment):*Error message. Takes all normal discord formatting.*}
{=(errormsg):Please provide a temperature in either C or F for the conversion to run. Make sure to include the unit of measurement, i.e. `!temp 32 F` or `!temp 0C`.
__**ɴᴏᴛᴇ:**__ You may enter your measurement in lowercase or uppercase, with or without a space.}
{=(comment):*Error embed title. Takes all normal discord formatting.*}
{=(errortitle):INPUT ERROR}
{=(comment):*Color for the error embed in hexadecimal. Currently set to red. I don't recommend changing it, but you can if you want. Set to {user(color)} to have it match the color of the user's name*}
{=(errorcolor):#ff0000}
{=(comment):*Image URL for the error embed thumbnail in the upper right corner. You can update this but it MUST be a direct URL. Do not edit if you don't know what that is.*}
{=(errorimg):https://i.imgur.com/oZEzSeY.png}
{=(COMMENT):***END ERROR EMBED FORMATTING.***}
{=(COMMENT):***FINAL EMBED STUFF DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING***}
{=(calc):{if({contains({ltype}):c}==true):{C2F}°F|{F2C}°C}}
{embed(color):{any({contains({ltype}):c}==true|{contains({ltype}):f}==true):{goodcolor}|{errorcolor}}}
{=(output):{any({contains({ltype}):c}==true|{contains({ltype}):f}==true):{calc}|{errormsg}}}
{=(title):{any({contains({ltype}):c}==true|{contains({ltype}):f}==true):{goodtitle}|{errortitle}}}
{=(img):{any({contains({ltype}):c}==true|{contains({ltype}):f}==true):{goodimg}|{errorimg}}}Embed
1 line{"color": 5198940, "title": "{title}", "footer": {"text": "{footer}", "icon_url": "{user(avatar)}"}, "thumbnail": {"url": "{img}"}, "description": "{output}"}Raw JSON
{
"id": 1170461,
"created_at": "2021-11-29T03:59:25.000Z",
"tag_name": "temp",
"nsfw": false,
"owner_id": "903546186873597993",
"uses": 4,
"description": null,
"restricted": false,
"shared": false,
"deleted": false,
"safe": "unrated",
"hidden": false,
"guild_id": "908685001690841088",
"sharer": "903546186873597993",
"content": "{=(COMMENT):**VARIABLE DEFINITIONS!***}\n{=(COMMENT):sets the first arg to raw if it's a numerical value, and 2nd arg to type if it is F or C. **CREDIT FOR THIS CODE TO RAFFAEL.**}\n{=(uargs):{upper:{args}}}\n{=(spaced):{replace(&, ):{join(&):{replace(F, F ):{replace(C, C ):{uargs}}}}}}\n{=(raw):{if({m:{spaced(1)}}=={m:{spaced(1)}/1}):{spaced(1)}}}\n{=(type):{if({contains({spaced(2)}):F C}==true):{spaced(2)}}}\n{=(ltype):{lower:{type}}}\n{=(C2C):{m:round(10*{raw})/10}}\n{=(F2F):{m:round(10*{raw})/10}}\n{=(C2F):{m:round(10*(({raw}*9/5)+32))/10}}\n{=(F2C):{m:round(10*(({raw}-32)*5/9))/10}}\n\n{=(COMMENT):scale of how it feels, the Celsius temps that correspond, colors, and images. Allows dynamic colors and images in embed. **CREDIT FOR THIS CODE TO RAFFAEL.**}\n{=(scale):0 5 10 17 23 28 50}\n{=(colors):3399FF 66CCFF 33FFEE CCFFFF 22FFBB FFAA33 FF5500 FF0000}\n{=(image):https://i.imgur.com/wmhquXi.png https://i.imgur.com/M844pcA.png https://i.imgur.com/bcPjDdn.png https://i.imgur.com/U6GQeXX.png https://i.imgur.com/d3H8xur.png https://i.imgur.com/BpLlJNH.png https://i.imgur.com/YyfCbef.png https://i.imgur.com/6Nwwxtj.png}\n\n{=(comment):grabs the temp in C, uses sgns to determine where in the scale the temperature falls by looking for the first -1 that occurs. changes all 0's to -1's for simplicity and to be \"downwards inclusive\" (ie, 0C = freezing). **CREDIT FOR THIS CODE TO RAFF.**}\n{=(cels):{{type}2C}}\n{=(sgns):{replace(0,-1):1 {m:sgn({cels}-{scale(1)})} {m:sgn({cels}-{scale(2)})} {m:sgn({cels}-{scale(3)})} {m:sgn({cels}-{scale(4)})} {m:sgn({cels}-{scale(5)})} {m:sgn({cels}-{scale(6)})} {m:sgn({cels}-{scale(7)})} -1}}\n\n\n{=(COMMENT):**SHARED EMBED FEATURES. Sets the footer and timestamp now for both embed outputs. You can delete these or edit them at will if you know what you're doing. NOTE: Make sure to delete the {user(avater)} out of the embed builder if you want to remove the footer.***}\n{embed(timestamp):now}\n{=(footer):{user}}\n\n{=(COMMENT):***BEGIN GOOD EMBED FORMATTING. EDIT WITH CAUTION. PAY CLOSE ATTENTION TO COMMENTS.***}\n\n{=(comment):*Title for a good conversion input. Uses a check to determine if user has input C or F. Please edit with caution to not break the check. I will not provide support if you break the code here*}\n{=(goodtitle):{if({contains({ltype}):c}==true):{raw}°C in °F is|{raw}°F in °C is}}\n\n{=(comment):*Color for the good embed in hexadecimal. Currently set to use a scale based on the temperature. Update to {user(color)} to have it match the color of the user's name or change to a hexadecimal code without the # sign to have it set to a single color.*}\n{=(goodcolor):#{colors({index(-1):{sgns}})}}\n\n{=(comment):*Image URL for the good embed thumbnail in the upper right corner. You can update this but it MUST be a direct URL. Do not edit if you don't know what that is.*}\n{=(goodimg):{image({index(-1):{sgns}})}}\n\n{=(COMMENT):***END GOOD EMBED FORMATTING.***}\n\n{=(COMMENT):***BEGIN ERROR EMBED FORMATTING. EDIT WITH CAUTION. PAY CLOSE ATTENTION TO COMMENTS.***}\n\n{=(comment):*Error message. Takes all normal discord formatting.*}\n{=(errormsg):Please provide a temperature in either C or F for the conversion to run. Make sure to include the unit of measurement, i.e. `!temp 32 F` or `!temp 0C`.\n\n__**ɴᴏᴛᴇ:**__ You may enter your measurement in lowercase or uppercase, with or without a space.}\n\n{=(comment):*Error embed title. Takes all normal discord formatting.*}\n{=(errortitle):INPUT ERROR}\n\n{=(comment):*Color for the error embed in hexadecimal. Currently set to red. I don't recommend changing it, but you can if you want. Set to {user(color)} to have it match the color of the user's name*}\n{=(errorcolor):#ff0000}\n\n{=(comment):*Image URL for the error embed thumbnail in the upper right corner. You can update this but it MUST be a direct URL. Do not edit if you don't know what that is.*}\n{=(errorimg):https://i.imgur.com/oZEzSeY.png}\n\n{=(COMMENT):***END ERROR EMBED FORMATTING.***}\n\n{=(COMMENT):***FINAL EMBED STUFF DO NOT TOUCH UNLESS YOU KNOW WHAT YOU ARE DOING***}\n{=(calc):{if({contains({ltype}):c}==true):{C2F}°F|{F2C}°C}}\n{embed(color):{any({contains({ltype}):c}==true|{contains({ltype}):f}==true):{goodcolor}|{errorcolor}}}\n{=(output):{any({contains({ltype}):c}==true|{contains({ltype}):f}==true):{calc}|{errormsg}}}\n{=(title):{any({contains({ltype}):c}==true|{contains({ltype}):f}==true):{goodtitle}|{errortitle}}}\n{=(img):{any({contains({ltype}):c}==true|{contains({ltype}):f}==true):{goodimg}|{errorimg}}}",
"embed": "{\"color\": 5198940, \"title\": \"{title}\", \"footer\": {\"text\": \"{footer}\", \"icon_url\": \"{user(avatar)}\"}, \"thumbnail\": {\"url\": \"{img}\"}, \"description\": \"{output}\"}",
"last_fetched": "2026-10-20T18:04:27.524Z"
}