Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- {if:{text:https://api.jsonblob.com/{getuser:SESSION|0}}|=|{"error":"Blob not found"}|then:{js:
- async function createJSON() {
- const url = 'https://api.jsonblob.com/'
- const data = {
- "variables":[],
- "attachments":[]
- }
- const respuesta = await fetch(url, {
- method: 'POST',
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
- body: JSON.stringify(data)
- })
- discord.storage.user.SESSION = respuesta.headers.get('location').slice(1);
- }
- createJSON()
- }}
- {set:session|{text:https://api.jsonblob.com/{getuser:SESSION}}}
- {eval:{foreach:{traversejson:variables|{get:session}}|{bracketleft}set:{traversejson:name|{get:valuex}}{splitterargument}{traversejson:value|{get:valuex}}{bracketright}}}
- {delete:session}
- {eval:{replace:(.+?)=(.*)|{ignore:{setuser:SESSION|$1}{if:$2|=||then:|else:{set:_|$2}}$2}|{getuser:SESSION}={eval:{args}}}}
- {js:
- let remaining = discord.variables;
- console.log(`{"embeds":[{"author":{"icon_url":"{avatar}","name":"{user}#{discrim}","url":"https://discord.com/users/{id}"},"color":${Math.floor(Math.random() * 256**3)},"description":"${(() => {
- const cm = discord.variables.__argsString.match(/\{([a-z]+)(?:\:(.+?))?\}/)
- switch(cm?.[1]) {
- case "help":
- return "REPL(Read-Eval-Print Loop) in TagScript\\n-# Developed by <@1005205558497906839>, the kappas @Sanae Kochiya and @Nitori Kawashiro ❤️\\nThis is an REPL, so you must go line by line, all the custom commands are `.tag {tagname} <custom_command>` or `.tag {tagname} <code>` for testcode all the variables will be saved when the code ends to evaluate, so you dont have to define them again\\nHere is a list of commans to use in the REPL\\n**{load:LINK}** loads a file as an attachment for the next sessions\\n**{save}** saves this session into a JSON if you want to load it again\\n**{loadjson:LINK}** loads a JSON to the session (the current session will be overwritten)\\n**{clear}** Reset this session (All the variables and attachments will be *deleted*)\\nMore commands comming soon! (sorry only the help works right now :cry:)";
- default:
- return "Say .tag {tagname} {help} to see the list of commands for this REPL"
- }
- })()}","fields":[{"name":"**Variables**:","value":"${(() => {
- for(const k in ({"__files":[],"__iterationsRemaining":10000,"__argsString":"path variables","__args":["path","variables"],"__aiExecutions":0,"__apiManipulations":0,"__networkRequests":0,"__networkRequestsML":0,"__networkRequestsOpenAI":0,"__fileSize":0,"__results":{},"__settings":{},"__tagExecutions":0,"__componentExecutions":0,"__isFromChildParsing":0,"__parentTagId":0})) {
- delete remaining[k]
- }
- let o = ""
- for(const k in remaining) {
- o += `\\n\\t **${k}**: ${remaining[k].replaceAll("\"","\\\"").replaceAll("\n","\\n")}`
- }
- if(o == "") {
- return "There are no variables…"
- }
- return o
- })()}"}],"footer":{"icon_url":"https://cdn.discordapp.com/attachments/1124758334805909509/1435121392499556404/Th19Sanae.png?ex=690ad073&is=69097ef3&hm=c3cbfadeb6e0830f1046a6e705cdc4058f66e45878d109b66f7c09f08996ad6f&","text":"Sanae Kochiya (exif copycat 2)"},"type":"poor"}]}`)
- const v = [];
- for(let k in remaining) {
- v.push({
- "name":k,"value":remaining[k]
- })
- }
- const url = 'https://api.jsonblob.com/{getuser:SESSION}'
- const data = {
- "variables":v,
- "attachments":[]
- }
- fetch(url, {
- method: 'PUT',
- headers: {
- 'Content-Type': 'application/json',
- 'Accept': 'application/json'
- },
- body: JSON.stringify(data)
- })
- }
Advertisement
Add Comment
Please, Sign In to add comment