Skip to content

Commit

Permalink
fix: remove unused extends
Browse files Browse the repository at this point in the history
  • Loading branch information
KagChi authored Aug 30, 2022
1 parent e383495 commit e5e367f
Showing 1 changed file with 0 additions and 15 deletions.
15 changes: 0 additions & 15 deletions src/Extenders/Node.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { Structure } = require('erela.js');
const WebSocket = require('ws');
const fetch = require('petitio');
const { version } = require('../../package.json');

class Node extends Structure.get('Node') {
Expand All @@ -25,20 +24,6 @@ class Node extends Structure.get('Node') {
this.socket.on('message', this.message.bind(this));
this.socket.on('error', this.error.bind(this));
}

async makeRequest(endpoint, modify) {
endpoint = endpoint.replace(/^\//gm, '');

const request = fetch(`http${this.options.secure ? 's' : ''}://${this.options.host}:${this.options.port}/${endpoint}`)
.header('Authorization', this.options.password).header('User-Agent', `NoteBlock v${version}`);

if (modify) {
await modify(request);
}

this.calls++;
return await request.json();
}
}

Structure.extend('Node', () => Node);

0 comments on commit e5e367f

Please sign in to comment.