innatealpaca / pterosocket Goto Github PK
View Code? Open in Web Editor NEWA websocket implementation for the pterodactyl server console
Home Page: https://discord.gg/A2SDjxQshJ
License: MIT License
A websocket implementation for the pterodactyl server console
Home Page: https://discord.gg/A2SDjxQshJ
License: MIT License
Output I get when a player talks in one of the minecraft game servers:
[20:15:12 INFO]: �[38;2;170;170;170m[Default]�[38;2;255;255;255m[�[38;2;255;170;0mPotatoland�[m|�[38;2;85;255;255mCyprus�[m] �[38;2;170;170;170mJuniorBoczek:�[m u 2�[m
Would like a way to just getting string with no color formatting. Things like those [m and else could be fixed with replace()
but the 34;45;178 and else are hard to get rid of.
I have recently made an API wrapper for pterodactyl called- 'pteroApiWrapper' for nodejs, if you agree we can collaborate and make the best API wrapper ever of pterodactyl panel in nodeJS, contact me on discord - Arnav G. Or contact me on email- [email protected] or just reply to this issue
Hi i wanted to try out your module but i cant seem to get it up.
My index.js contains:
const { pterosocket } = require('pterosocket')
const origin = "domain"; // your panel's domain
const api_key = "key"; //the api-key generated
const server_no = "num"; //the number of the server
const socket = new pterosocket(origin, api_key, server_no);
socket.on("start", ()=>{
console.log("Connected!")
socket.writeCommand("say console connected!");
})
and i cant run it. when i use node index.js
i get this:
PS E:\js-ptero-console-output> node index.js
E:\js-ptero-console-output\node_modules\pterosocket\src\pterosocket.js:31
async #authLogin(token = ""){
^
SyntaxError: Unexpected token '('
at wrapSafe (internal/modules/cjs/loader.js:1053:16)
at Module._compile (internal/modules/cjs/loader.js:1101:27)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
at Module.load (internal/modules/cjs/loader.js:985:32)
at Function.Module._load (internal/modules/cjs/loader.js:878:14)
at Module.require (internal/modules/cjs/loader.js:1025:19)
at require (internal/modules/cjs/helpers.js:72:18)
at Object.<anonymous> (E:\VBA_PROJECTS\Git\andzejsp\js-ptero-console-output\node_modules\pterosocket\index.js:1:25)
at Module._compile (internal/modules/cjs/loader.js:1137:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1157:10)
PS E:\js-ptero-console-output>
What am i doing wrong?
This looks really promising. I was wondering if you currently use VS Code as your main IDE. I've been really wanting to handle all development within VSCode directly without opening up the web browser to type in a command and something like this as an extension would be very cool.
Has this been a use case you might've been thinking of when developing?
plz help
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.