discord.js 15.0.0-dev.1733184845-bd7a99571 → 15.0.0-dev.1733357584-d0dc86488
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 +5 -4
- package/package.json +4 -4
- package/src/util/Events.js +1 -1
package/README.md
CHANGED
|
@@ -83,14 +83,15 @@ try {
|
|
|
83
83
|
Afterwards we can create a quite simple example bot:
|
|
84
84
|
|
|
85
85
|
```js
|
|
86
|
-
import { Client, GatewayIntentBits } from 'discord.js';
|
|
86
|
+
import { Client, Events, GatewayIntentBits } from 'discord.js';
|
|
87
|
+
|
|
87
88
|
const client = new Client({ intents: [GatewayIntentBits.Guilds] });
|
|
88
89
|
|
|
89
|
-
client.on(
|
|
90
|
-
console.log(`Logged in as ${
|
|
90
|
+
client.on(Events.ClientReady, readyClient => {
|
|
91
|
+
console.log(`Logged in as ${readyClient.user.tag}!`);
|
|
91
92
|
});
|
|
92
93
|
|
|
93
|
-
client.on(
|
|
94
|
+
client.on(Events.InteractionCreate, async interaction => {
|
|
94
95
|
if (!interaction.isChatInputCommand()) return;
|
|
95
96
|
|
|
96
97
|
if (interaction.commandName === 'ping') {
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"$schema": "https://json.schemastore.org/package.json",
|
|
3
3
|
"name": "discord.js",
|
|
4
|
-
"version": "15.0.0-dev.
|
|
4
|
+
"version": "15.0.0-dev.1733357584-d0dc86488",
|
|
5
5
|
"description": "A powerful library for interacting with the Discord API",
|
|
6
6
|
"main": "./src/index.js",
|
|
7
7
|
"types": "./typings/index.d.ts",
|
|
@@ -60,9 +60,9 @@
|
|
|
60
60
|
"lodash.snakecase": "4.1.1",
|
|
61
61
|
"tslib": "^2.8.1",
|
|
62
62
|
"undici": "6.21.0",
|
|
63
|
-
"@discordjs/formatters": "^0.5.0",
|
|
64
|
-
"@discordjs/ws": "^2.0.0",
|
|
65
63
|
"@discordjs/rest": "^2.4.0",
|
|
64
|
+
"@discordjs/ws": "^2.0.0",
|
|
65
|
+
"@discordjs/formatters": "^0.5.0",
|
|
66
66
|
"@discordjs/util": "^1.1.1"
|
|
67
67
|
},
|
|
68
68
|
"devDependencies": {
|
|
@@ -80,8 +80,8 @@
|
|
|
80
80
|
"tslint": "6.1.3",
|
|
81
81
|
"turbo": "^2.3.0",
|
|
82
82
|
"typescript": "~5.5.4",
|
|
83
|
-
"@discordjs/api-extractor": "^7.38.1",
|
|
84
83
|
"@discordjs/docgen": "^0.12.1",
|
|
84
|
+
"@discordjs/api-extractor": "^7.38.1",
|
|
85
85
|
"@discordjs/scripts": "^0.1.0"
|
|
86
86
|
},
|
|
87
87
|
"engines": {
|
package/src/util/Events.js
CHANGED
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
* @property {string} ChannelDelete channelDelete
|
|
13
13
|
* @property {string} ChannelPinsUpdate channelPinsUpdate
|
|
14
14
|
* @property {string} ChannelUpdate channelUpdate
|
|
15
|
-
* @property {string} ClientReady
|
|
15
|
+
* @property {string} ClientReady clientReady
|
|
16
16
|
* @property {string} Debug debug
|
|
17
17
|
* @property {string} EntitlementCreate entitlementCreate
|
|
18
18
|
* @property {string} EntitlementUpdate entitlementUpdate
|