catto.js 0.6.9 → 0.7.1
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/Bot.js +11 -0
- package/package.json +5 -5
package/Bot.js
CHANGED
|
@@ -35,6 +35,7 @@ module.exports = class extends EventEmitter {
|
|
|
35
35
|
}
|
|
36
36
|
});
|
|
37
37
|
}
|
|
38
|
+
this.currentStatus = void 0;
|
|
38
39
|
this.buttons = new Map();
|
|
39
40
|
this.commands = new Map();
|
|
40
41
|
this.slashCommands = new Map();
|
|
@@ -210,6 +211,11 @@ module.exports = class extends EventEmitter {
|
|
|
210
211
|
r.count = r.length;
|
|
211
212
|
return r;
|
|
212
213
|
}
|
|
214
|
+
get channels() {
|
|
215
|
+
var r = Array.from(this.client.channels.cache.values());
|
|
216
|
+
r.count = r.length;
|
|
217
|
+
return r;
|
|
218
|
+
}
|
|
213
219
|
slashCommand(basic, options, executor) {
|
|
214
220
|
if (!basic.name.startsWith("/")) {
|
|
215
221
|
throw new Error("Slash command starts with /.");
|
|
@@ -373,4 +379,9 @@ module.exports = class extends EventEmitter {
|
|
|
373
379
|
this.emit("interaction", interaction);
|
|
374
380
|
}
|
|
375
381
|
}
|
|
382
|
+
setStatus(data) {
|
|
383
|
+
this.currentStatus = data;
|
|
384
|
+
this.client.options.presence = data;
|
|
385
|
+
return this.client.user.setPresence(data);
|
|
386
|
+
}
|
|
376
387
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "catto.js",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.7.1",
|
|
4
4
|
"description": "Universal module for everything.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -43,12 +43,12 @@
|
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
45
|
"body-parser": "^1.20.2",
|
|
46
|
-
"discord.js": "^14.
|
|
47
|
-
"ejs": "^3.1.
|
|
48
|
-
"express": "^4.
|
|
46
|
+
"discord.js": "^14.15.3",
|
|
47
|
+
"ejs": "^3.1.10",
|
|
48
|
+
"express": "^4.19.2",
|
|
49
49
|
"express-session": "^1.18.0",
|
|
50
50
|
"express-ws": "^5.0.2",
|
|
51
|
-
"node-telegram-bot-api": "^0.
|
|
51
|
+
"node-telegram-bot-api": "^0.66.0",
|
|
52
52
|
"request": "^2.88.2",
|
|
53
53
|
"session-file-store": "^1.5.0",
|
|
54
54
|
"tweetnacl": "^1.0.3"
|