diff --git a/.deepsource.toml b/.deepsource.toml deleted file mode 100644 index c48f8c4..0000000 --- a/.deepsource.toml +++ /dev/null @@ -1,9 +0,0 @@ -version = 1 - -[[analyzers]] -name = "javascript" -enabled = true - -[[transformers]] -name = "standardjs" -enabled = true \ No newline at end of file diff --git a/.github/FUNDING.yml b/.github/FUNDING.yml index dc54c10..8afc379 100644 --- a/.github/FUNDING.yml +++ b/.github/FUNDING.yml @@ -10,4 +10,4 @@ liberapay: # Replace with a single Liberapay username issuehunt: # Replace with a single IssueHunt username otechie: # Replace with a single Otechie username lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry -custom: # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] +custom: ['https://www.buymeacoffee.com/mazkdevf'] # Replace with up to 4 custom sponsorship URLs e.g., ['link1', 'link2'] diff --git a/README.md b/README.md index 9cdb878..bb21189 100644 --- a/README.md +++ b/README.md @@ -6,10 +6,6 @@ #### **KeyAuth 1.1 API EndPoint Example** **[Redirect to Example Project](./src/API1.1/)** -#### **KeyAuth 1.2 API --> NOT OUT YET <--** -**[Redirect to Example Project](./src/API1.2/)** - - ### **Contributing** If you are interested with Contributing on this project open an issue and we will discuss with it, or you can also open a pull request and we will review it. If your pull request is Good, and Perfect without any issues we will merge it. diff --git a/src/API1.1/KeyAuth.js b/src/API1.1/KeyAuth.js index eaf6fd1..5c1561a 100644 --- a/src/API1.1/KeyAuth.js +++ b/src/API1.1/KeyAuth.js @@ -507,7 +507,7 @@ class KeyAuth { this.check_initialize() const post_data = { - type: 'fetchOnline', + type: 'chatsend', message: Message, channel: ChannelName, sessionid: this.sessionid, @@ -656,13 +656,18 @@ class Misc { * @returns {string} - Returns user HardwareID **/ static GetCurrentHardwareId() { - if (os.platform() != 'win32') return false + let system_id = null; - const cmd = execSync('wmic useraccount where name="%username%" get sid').toString('utf-8') + if (os.platform() === 'win32') { + const cmd = execSync('wmic useraccount where name="%username%" get sid').toString('utf-8'); + system_id = cmd.split('\n')[1].trim(); + } else if (os.platform() === 'darwin') { + const cmd = execSync("ioreg -rd1 -c IOPlatformExpertDevice | awk '/IOPlatformUUID/ { print $3; }'").toString('utf-8'); + system_id = cmd.trim(); + } - const system_id = cmd.split('\n')[1].trim() - return system_id - }; + return system_id; +}; /** * Error Print Function diff --git a/src/API1.2/README.md b/src/API1.2/README.md index 5c782d5..6f9422e 100644 --- a/src/API1.2/README.md +++ b/src/API1.2/README.md @@ -1,145 +1,5 @@ ## KeyAuth JavaScript Example -- Not Available Yet +We now have [KeyAuthJS](https://www.npmjs.com/package/@keyauthjs/client) this can be used with 1.2 onwards ------------ -### **Example Codes** - - - -##### **Filling KeyAuth Class Constructor** -```js -const KeyAuthApp = new KeyAuth( - '', // Application Name - '', // Application OwnerId - '', // Application Secret - '1.0' // Application Version -); -``` - -##### **Initializing Application** -```js -await KeyAuthApp.Initialize(); -``` ---- - -##### **General Features** -###### **Login** -```js -await KeyAuthApp.login("", ""); -``` - -###### **Register** -```js -await KeyAuthApp.register("", "", "", "") -``` - -###### **Forgot** -```js -await KeyAuthApp.forgot("", ""); -``` - - -###### **License Login** -```js -await KeyAuthApp.license(""); -``` - -###### **Upgrade an Account** -```js -await KeyAuthApp.upgrade("", ""); -``` ---- - -##### **Variables** -###### **Get Public Variable** -```js -await KeyAuthApp.var(""); -``` - -###### **Get User Variable** -```js -await KeyAuthApp.GetVar(""); -``` - -###### **Set User Variable** -```js -await KeyAuthApp.SetVar("", ""); -``` ---- -##### **Banning Logged in User** -```js -await KeyAuthApp.ban(); -``` ---- - -##### **File Downloads** -```js -await KeyAuthApp.file(""); -``` ---- -##### **Webhooks** - -###### Normal Request with Params -```js -await KeyAuthApp.webhook("", "") -``` - -###### Webhook Request with Body & Content Type -```js -await KeyAuthApp.webhook("", "", "", ""); -``` - -###### Discord Webhook Example -```js -await KeyAuthApp.webhook("", "", "{\"content\": \"webhook message here\",\"embeds\": null}", "application/json"); -``` ---- -##### **Checks** -###### Check Session Status -```js -await KeyAuthApp.check(); -``` - -##### **Check Blacklist Status** -```js -await KeyAuthApp.checkBlack(); -``` - -##### **Check / Fetch Online Users** -```js -await KeyAuthApp.fetchOnline(); -``` ---- - - -##### **Chats** -###### Get 20 Latest Chat Messages - -```js -await KeyAuthApp.ChatGet(); -``` - -###### Send Chat Message -```js -await KeyAuthApp.ChatSend("", ""); -``` ---- - -##### **Logs** -```js -await KeyAuthApp.log(""); -``` ---- - -### **Additional / Extra Functions** - -##### **Set/Change Console Title** -```js -await KeyAuthApp.setTitle(""); -``` - -##### **Sleep is ms(s)** -```js -await KeyAuthApp.sleep("<1 sec = 1000ms>") -``` \ No newline at end of file +This [repo](https://github.com/lIMonkieIl/keyauth-js) was created by someone from our community please go and give the project a star.