@imaentity/selfjs 1.4.8 → 1.5.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/docs.md +1 -1
  2. package/package.json +1 -1
  3. package/self.js +8 -8
package/docs.md CHANGED
@@ -64,7 +64,7 @@
64
64
 
65
65
  - **deleteMessage(channelID, messageID)**: Deletes a message.
66
66
 
67
- - **setStatus(status, activity, type)**: Sets the status of the client.
67
+ - **setStatus(status, activities, afk = false)**: Sets the status of the client.
68
68
 
69
69
  - **createChannel(userIDs)**: Creates a new channel with the specified users.
70
70
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@imaentity/selfjs",
3
- "version": "1.4.8",
3
+ "version": "1.5.9",
4
4
  "description": "Breaking Discord's TOS to bot user accounts.",
5
5
  "main": "self.js",
6
6
  "repository": {
package/self.js CHANGED
@@ -2,7 +2,7 @@
2
2
  * @name SelfJS
3
3
  * @description Breaking Discord's TOS to bot user accounts.
4
4
  * @author Эмберс
5
- * @version 1.4.8
5
+ * @version 1.5.9
6
6
  */
7
7
 
8
8
  const https = require("https");
@@ -23,8 +23,10 @@ module.exports = {
23
23
  status: {
24
24
  DEFAULT: -1,
25
25
  PLAYING: 0,
26
+ STREAMING: 1,
26
27
  LISTENING: 2,
27
28
  WATCHING: 3,
29
+ CUSTOM: 4,
28
30
  COMPETING: 5
29
31
  },
30
32
 
@@ -322,6 +324,7 @@ module.exports = {
322
324
  requestChunks.push(chunk);
323
325
  }).on("end", function() {
324
326
  const requestResData = JSON.parse(Buffer.concat(requestChunks));
327
+
325
328
  const fileOptions = {
326
329
  host: "discord-attachments-uploads-prd.storage.googleapis.com",
327
330
  port: 443,
@@ -869,18 +872,15 @@ module.exports = {
869
872
  });
870
873
  }
871
874
 
872
- setStatus(status, activity, type) {
873
- return new Promise(function(resolve) {
875
+ setStatus(status, activities, afk = false) {
876
+ return new Promise(function (resolve) {
874
877
  this.socket.send(JSON.stringify({
875
878
  op: 3,
876
879
  d: {
877
880
  since: Date.now(),
878
881
  status,
879
- activities: [{
880
- name: activity,
881
- type
882
- }],
883
- afk: false
882
+ activities,
883
+ afk
884
884
  }
885
885
  }));
886
886