@imaentity/selfjs 1.4.8 → 1.5.8
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.
- package/docs.md +1 -1
- package/package.json +1 -1
- package/self.js +7 -7
package/docs.md
CHANGED
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
|
|
65
65
|
- **deleteMessage(channelID, messageID)**: Deletes a message.
|
|
66
66
|
|
|
67
|
-
- **setStatus(status,
|
|
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
package/self.js
CHANGED
|
@@ -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,
|
|
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
|
-
|
|
881
|
-
type
|
|
882
|
-
}],
|
|
883
|
-
afk: false
|
|
882
|
+
activities,
|
|
883
|
+
afk
|
|
884
884
|
}
|
|
885
885
|
}));
|
|
886
886
|
|