@nerimity/nerimity.js 1.8.2 → 1.8.3
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/README.md +23 -0
- package/package.json +10 -2
package/README.md
ADDED
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
## Example
|
|
2
|
+
|
|
3
|
+
```js
|
|
4
|
+
const { Client, Events } = require("@nerimity/nerimity.js");
|
|
5
|
+
|
|
6
|
+
const client = new Client();
|
|
7
|
+
|
|
8
|
+
client.on(Events.Ready, () => {
|
|
9
|
+
console.log(`Connected as ${client.user?.username}!`);
|
|
10
|
+
});
|
|
11
|
+
|
|
12
|
+
client.on(Events.MessageCreate, async (message) => {
|
|
13
|
+
if (message.user.id === client.user.id) return;
|
|
14
|
+
|
|
15
|
+
if (message.content === "!ping") {
|
|
16
|
+
const t0 = Date.now();
|
|
17
|
+
const reply = await message.reply("Pong!");
|
|
18
|
+
reply.edit(reply.content + ` (${Date.now() - t0}ms)`);
|
|
19
|
+
}
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
client.login("paste token here");
|
|
23
|
+
```
|
package/package.json
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nerimity/nerimity.js",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "build/index.js",
|
|
6
6
|
"keywords": [],
|
|
7
|
-
"author": "",
|
|
7
|
+
"author": "SupertigerDev",
|
|
8
8
|
"license": "ISC",
|
|
9
9
|
"devDependencies": {
|
|
10
10
|
"@types/node-fetch": "^2.6.11",
|
|
@@ -22,6 +22,14 @@
|
|
|
22
22
|
"socket.io-client": "^4.7.4",
|
|
23
23
|
"ws": "^8.18.0"
|
|
24
24
|
},
|
|
25
|
+
"repository": {
|
|
26
|
+
"type": "git",
|
|
27
|
+
"url": "git+https://github.com/Nerimity/nerimity.js.git"
|
|
28
|
+
},
|
|
29
|
+
"bugs": {
|
|
30
|
+
"url": "https://github.com/Nerimity/nerimity.js/issues"
|
|
31
|
+
},
|
|
32
|
+
"homepage": "https://github.com/Nerimity/nerimity.js#readme",
|
|
25
33
|
"scripts": {
|
|
26
34
|
"build": "tsc"
|
|
27
35
|
}
|