Compare commits
	
		
			2 Commits
		
	
	
		
			4d554581cd
			...
			354e60cb92
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 354e60cb92 | |||
| e3793ca216 | 
							
								
								
									
										8
									
								
								index.js
									
									
									
									
									
								
							
							
						
						
									
										8
									
								
								index.js
									
									
									
									
									
								
							@ -103,6 +103,7 @@ async function check_friends() {
 | 
				
			|||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (!last_online || went_online?.length || went_offline?.length) {
 | 
						if (!last_online || went_online?.length || went_offline?.length) {
 | 
				
			||||||
 | 
							let total_len = online.reduce((sum, usr) => sum + usr.displayName.length + 2, 0), toolong = total_len > 280;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
		let priv = online.filter(user => user.location == "private");
 | 
							let priv = online.filter(user => user.location == "private");
 | 
				
			||||||
		let notpriv = online.filter(user => user.location != "private");
 | 
							let notpriv = online.filter(user => user.location != "private");
 | 
				
			||||||
@ -112,14 +113,14 @@ async function check_friends() {
 | 
				
			|||||||
		if (notpriv.length) {
 | 
							if (notpriv.length) {
 | 
				
			||||||
			text.addText("Online: ")
 | 
								text.addText("Online: ")
 | 
				
			||||||
			for (let u of notpriv) {
 | 
								for (let u of notpriv) {
 | 
				
			||||||
				text.addLink(u.displayName, `https://vrchat.com/home/user/${u.id}`);
 | 
									text.addLink(toolong ? u.displayName.slice(1) : u.displayName, `https://vrchat.com/home/user/${u.id}`);
 | 
				
			||||||
				text.addText(", ");
 | 
									text.addText(", ");
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
		if (priv.length) {
 | 
							if (priv.length) {
 | 
				
			||||||
			text.addText("\n\nPrivate: ");
 | 
								text.addText("\n\nPrivate: ");
 | 
				
			||||||
			for (let u of priv) {
 | 
								for (let u of priv) {
 | 
				
			||||||
				text.addLink(u.displayName, `https://vrchat.com/home/user/${u.id}`);
 | 
									text.addLink(toolong ? u.displayName.slice(1) : u.displayName, `https://vrchat.com/home/user/${u.id}`);
 | 
				
			||||||
				text.addText(", ");
 | 
									text.addText(", ");
 | 
				
			||||||
			}
 | 
								}
 | 
				
			||||||
		}
 | 
							}
 | 
				
			||||||
@ -138,6 +139,9 @@ while (true) {
 | 
				
			|||||||
		await check_friends();
 | 
							await check_friends();
 | 
				
			||||||
	} catch (error) {
 | 
						} catch (error) {
 | 
				
			||||||
		console.error(error.stack);
 | 
							console.error(error.stack);
 | 
				
			||||||
 | 
							if (error.response) {
 | 
				
			||||||
 | 
								console.error(error.response.data);
 | 
				
			||||||
 | 
							}
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
	await new Promise(r => setTimeout(r, 1000*60*5));
 | 
						await new Promise(r => setTimeout(r, 1000*60*5));
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
							
								
								
									
										19
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							
							
						
						
									
										19
									
								
								package-lock.json
									
									
									
										generated
									
									
									
								
							@ -7,8 +7,8 @@
 | 
				
			|||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "@skyware/bot": "^0.3.11",
 | 
					        "@skyware/bot": "^0.3.11",
 | 
				
			||||||
        "dotenv": "^16.5.0",
 | 
					        "dotenv": "^16.5.0",
 | 
				
			||||||
        "tough-cookie-file-store": "^3.0.1",
 | 
					        "tough-cookie-file-store": "^3.0.2",
 | 
				
			||||||
        "vrchat": "^1.19.1"
 | 
					        "vrchat": "^1.19.4"
 | 
				
			||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/@atcute/bluesky": {
 | 
					    "node_modules/@atcute/bluesky": {
 | 
				
			||||||
@ -108,7 +108,6 @@
 | 
				
			|||||||
      "version": "0.3.11",
 | 
					      "version": "0.3.11",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/@skyware/bot/-/bot-0.3.11.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/@skyware/bot/-/bot-0.3.11.tgz",
 | 
				
			||||||
      "integrity": "sha512-fG4uvD/3+ynlQPRHv6pz4kk+5fbDNJYTORbLXwmlwWAzJ7FSBkahG1NeK2M+hqIYBVqdzAI5QqcM17fwJXeZeQ==",
 | 
					      "integrity": "sha512-fG4uvD/3+ynlQPRHv6pz4kk+5fbDNJYTORbLXwmlwWAzJ7FSBkahG1NeK2M+hqIYBVqdzAI5QqcM17fwJXeZeQ==",
 | 
				
			||||||
      "license": "MPL-2.0",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "@atcute/bluesky": "^1.0.7",
 | 
					        "@atcute/bluesky": "^1.0.7",
 | 
				
			||||||
        "@atcute/bluesky-richtext-builder": "^1.0.1",
 | 
					        "@atcute/bluesky-richtext-builder": "^1.0.1",
 | 
				
			||||||
@ -336,10 +335,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/tough-cookie-file-store": {
 | 
					    "node_modules/tough-cookie-file-store": {
 | 
				
			||||||
      "version": "3.0.1",
 | 
					      "version": "3.0.2",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/tough-cookie-file-store/-/tough-cookie-file-store-3.0.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/tough-cookie-file-store/-/tough-cookie-file-store-3.0.2.tgz",
 | 
				
			||||||
      "integrity": "sha512-xRLHFG0zY83tVeMZIG9J38BgQF3N+r/DjDkrnDka5V84NF6whj9E6cI4Lq5jndakec7pZ3jZ03m+RbGnbcyekg==",
 | 
					      "integrity": "sha512-5Ot63W/4ZwZYDlurFJBqGsC3YNQ6nShksAQZa9z16n7tyCINK+KGKuaShsRPikOtFIbIJGRnwq1zbF3OyV4gVg==",
 | 
				
			||||||
      "license": "MIT",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "tough-cookie": "^5.0.0"
 | 
					        "tough-cookie": "^5.0.0"
 | 
				
			||||||
      },
 | 
					      },
 | 
				
			||||||
@ -379,10 +377,9 @@
 | 
				
			|||||||
      }
 | 
					      }
 | 
				
			||||||
    },
 | 
					    },
 | 
				
			||||||
    "node_modules/vrchat": {
 | 
					    "node_modules/vrchat": {
 | 
				
			||||||
      "version": "1.19.1",
 | 
					      "version": "1.19.4",
 | 
				
			||||||
      "resolved": "https://registry.npmjs.org/vrchat/-/vrchat-1.19.1.tgz",
 | 
					      "resolved": "https://registry.npmjs.org/vrchat/-/vrchat-1.19.4.tgz",
 | 
				
			||||||
      "integrity": "sha512-lV6nCpQpHH+O5SnrVq3b3sPThUw4jExXgrI8fAr3ZoWyLn4SUn1RRjUmVDaypSDmnxbJH6AOowIiq3O2RtHejw==",
 | 
					      "integrity": "sha512-ALEvO5VodRDvKw4pvhLV7a/3bUuCv+sv4V1M1qHlYgcKNWTDdKkKpIleVUqW7CZ/+uGJQA0eHQwSImrQ7ew0kw==",
 | 
				
			||||||
      "license": "MIT",
 | 
					 | 
				
			||||||
      "dependencies": {
 | 
					      "dependencies": {
 | 
				
			||||||
        "@types/tough-cookie": "^4.0.1",
 | 
					        "@types/tough-cookie": "^4.0.1",
 | 
				
			||||||
        "axios": "^0.26.1",
 | 
					        "axios": "^0.26.1",
 | 
				
			||||||
 | 
				
			|||||||
@ -2,8 +2,8 @@
 | 
				
			|||||||
  "dependencies": {
 | 
					  "dependencies": {
 | 
				
			||||||
    "@skyware/bot": "^0.3.11",
 | 
					    "@skyware/bot": "^0.3.11",
 | 
				
			||||||
    "dotenv": "^16.5.0",
 | 
					    "dotenv": "^16.5.0",
 | 
				
			||||||
    "tough-cookie-file-store": "^3.0.1",
 | 
					    "tough-cookie-file-store": "^3.0.2",
 | 
				
			||||||
    "vrchat": "^1.19.1"
 | 
					    "vrchat": "^1.19.4"
 | 
				
			||||||
  },
 | 
					  },
 | 
				
			||||||
  "type": "module"
 | 
					  "type": "module"
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user