disgroove 1.3.4 → 2.0.0-dev.0f17bf6

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 (68) hide show
  1. package/README.md +9 -9
  2. package/dist/lib/Client.d.ts +562 -144
  3. package/dist/lib/Client.js +1795 -125
  4. package/dist/lib/Client.js.map +1 -1
  5. package/dist/lib/constants.d.ts +7 -7
  6. package/dist/lib/constants.js +218 -218
  7. package/dist/lib/gateway/Shard.d.ts +0 -1
  8. package/dist/lib/gateway/Shard.js +65 -261
  9. package/dist/lib/gateway/Shard.js.map +1 -1
  10. package/dist/lib/gateway/ShardManager.d.ts +5 -0
  11. package/dist/lib/gateway/ShardManager.js +13 -0
  12. package/dist/lib/gateway/ShardManager.js.map +1 -0
  13. package/dist/lib/gateway/index.d.ts +1 -1
  14. package/dist/lib/gateway/index.js +1 -1
  15. package/dist/lib/gateway/index.js.map +1 -1
  16. package/dist/lib/index.d.ts +0 -1
  17. package/dist/lib/index.js +0 -1
  18. package/dist/lib/index.js.map +1 -1
  19. package/dist/lib/rest/CDN.d.ts +21 -21
  20. package/dist/lib/rest/CDN.js +21 -21
  21. package/dist/lib/rest/CDN.js.map +1 -1
  22. package/dist/lib/rest/Endpoints.d.ts +3 -3
  23. package/dist/lib/rest/Endpoints.js +8 -8
  24. package/dist/lib/rest/Endpoints.js.map +1 -1
  25. package/dist/lib/rest/REST.d.ts +2 -2
  26. package/dist/lib/rest/REST.js +1 -1
  27. package/dist/lib/rest/REST.js.map +1 -1
  28. package/dist/lib/rest/RequestManager.d.ts +28 -0
  29. package/dist/lib/rest/RequestManager.js +130 -0
  30. package/dist/lib/rest/RequestManager.js.map +1 -0
  31. package/dist/lib/rest/index.d.ts +1 -2
  32. package/dist/lib/rest/index.js +1 -2
  33. package/dist/lib/rest/index.js.map +1 -1
  34. package/dist/lib/types/application-command.d.ts +94 -20
  35. package/dist/lib/types/application-role-connection-metadata.d.ts +7 -6
  36. package/dist/lib/types/application.d.ts +24 -13
  37. package/dist/lib/types/audit-log.d.ts +15 -16
  38. package/dist/lib/types/auto-moderation.d.ts +27 -7
  39. package/dist/lib/types/channel.d.ts +170 -68
  40. package/dist/lib/types/emoji.d.ts +12 -3
  41. package/dist/lib/types/entitlements.d.ts +6 -1
  42. package/dist/lib/types/gateway-events.d.ts +11 -336
  43. package/dist/lib/types/guild-scheduled-event.d.ts +31 -8
  44. package/dist/lib/types/guild-template.d.ts +16 -4
  45. package/dist/lib/types/guild.d.ts +190 -37
  46. package/dist/lib/types/index.d.ts +2 -0
  47. package/dist/lib/types/index.js.map +1 -1
  48. package/dist/lib/types/interaction.d.ts +37 -36
  49. package/dist/lib/types/invite.d.ts +12 -12
  50. package/dist/lib/types/message-components.d.ts +12 -12
  51. package/dist/lib/types/role.d.ts +3 -3
  52. package/dist/lib/types/sku.d.ts +8 -8
  53. package/dist/lib/types/stage-instance.d.ts +12 -1
  54. package/dist/lib/types/sticker.d.ts +18 -6
  55. package/dist/lib/types/team.d.ts +5 -5
  56. package/dist/lib/types/user.d.ts +30 -7
  57. package/dist/lib/types/voice.d.ts +4 -4
  58. package/dist/lib/types/webhook.d.ts +38 -6
  59. package/dist/lib/utils/Util.d.ts +2 -13
  60. package/dist/lib/utils/Util.js +39 -535
  61. package/dist/lib/utils/Util.js.map +1 -1
  62. package/dist/lib/utils/errors.d.ts +1 -1
  63. package/dist/lib/utils/errors.js +4 -4
  64. package/dist/lib/utils/index.d.ts +0 -1
  65. package/dist/lib/utils/index.js +0 -1
  66. package/dist/lib/utils/index.js.map +1 -1
  67. package/dist/package.json +1 -1
  68. package/package.json +1 -1
package/README.md CHANGED
@@ -5,7 +5,7 @@ A module to interface with Discord
5
5
  ## Features
6
6
 
7
7
  - No cache: For large bots the cache might be a RAM memory management issue, this module doesn't include it
8
- - Very rough style: Using a rough style for methods will always allow you to use the latest [Discord change-log](https://discord.com/developers/docs/change-log), even if the module had not yet been updated to that change-log
8
+ - Very fast: The module contains all methods in the Client class, so sending API requests will not have to go through a third party, and this allows the module to be faster
9
9
  - Documentation-based: The module is based entirely on the [Official Discord API Documentation](https://discord.com/developers/docs/intro), so it does not add custom methods or properties, to avoid future problems
10
10
 
11
11
  ## Installation
@@ -34,27 +34,27 @@ const client = new Client("token", {
34
34
  });
35
35
 
36
36
  client.on("ready", async () => {
37
- console.log(`${client.user.username} is now online!`); // Print "Username is now online!" when the bot connects to the gateway
37
+ console.log(`${client.user.username} is now online!`); // Prints "Username is now online!" when the bot connects to the gateway
38
38
 
39
- client.application.createGlobalApplicationCommand({
39
+ client.createGlobalApplicationCommand(client.application.id, {
40
40
  name: "ping",
41
41
  description: "Responds with Pong! 🏓",
42
- }); // Create a global application command named "ping"
42
+ }); // Creates a global application command named "ping"
43
43
 
44
44
  client.setPresence({
45
45
  activity: {
46
46
  name: "/ping",
47
47
  type: ActivityType.Watching,
48
48
  },
49
- }); // Update the bot presence to "Watching /ping"
49
+ }); // Updates the bot presence to "Watching /ping"
50
50
  });
51
51
 
52
52
  client.on("interactionCreate", async (interaction) => {
53
- if (interaction.type !== InteractionType.ApplicationCommand) return; // Check if the interaction is an application command
53
+ if (interaction.type !== InteractionType.ApplicationCommand) return; // Checks if the interaction is an application command
54
54
 
55
55
  if (interaction.data.name === "ping") {
56
- // Check if the application command name is equals to "ping"
57
- interaction.createResponse({
56
+ // Checks if the application command name is equals to "ping"
57
+ client.createInteractionResponse(interaction.id, interaction.token, {
58
58
  type: InteractionCallbackType.ChannelMessageWithSource,
59
59
  data: {
60
60
  content: "Pong! 🏓",
@@ -64,7 +64,7 @@ client.on("interactionCreate", async (interaction) => {
64
64
  }
65
65
  });
66
66
 
67
- client.connect(); // Connect the bot to the gateway
67
+ client.connect(); // Connects the bot to the gateway
68
68
  ```
69
69
 
70
70
  Enjoy the package? Give it a ⭐ on [GitHub repository](https://github.com/XenKys/disgroove)