https://github.com/sergiogotuzzo/disgroove
A module to interface with Discord
https://github.com/sergiogotuzzo/disgroove
api bot discord gateway http https rest wrapper
Last synced: 5 months ago
JSON representation
A module to interface with Discord
- Host: GitHub
- URL: https://github.com/sergiogotuzzo/disgroove
- Owner: sergiogotuzzo
- License: mit
- Created: 2023-07-22T19:48:10.000Z (almost 3 years ago)
- Default Branch: dev
- Last Pushed: 2025-03-22T09:03:50.000Z (about 1 year ago)
- Last Synced: 2025-05-07T04:06:23.293Z (about 1 year ago)
- Topics: api, bot, discord, gateway, http, https, rest, wrapper
- Language: TypeScript
- Homepage: https://www.npmjs.com/package/disgroove
- Size: 1.44 MB
- Stars: 8
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# disgroove
A module to interface with Discord
- Fast
- Lightweight
- Flexible
- 100% coverage of the [Official Discord API Documentation](https://discord.com/developers/docs/intro)
## Example
```js
const {
Client,
GatewayIntents,
InteractionType,
InteractionCallbackType,
MessageFlags,
} = require("disgroove");
const client = new Client("B0t.T0k3N");
client.once("ready", () => {
console.log("Logged in as", client.user.username);
client.createGlobalApplicationCommand(client.application.id, {
name: "ping",
description: "Pong!",
});
});
client.on("interactionCreate", async (interaction) => {
if (interaction.type !== InteractionType.ApplicationCommand) return;
if (interaction.data.name === "ping") {
client.createInteractionResponse(interaction.id, interaction.token, {
type: InteractionCallbackType.ChannelMessageWithSource,
data: {
content: "Pong! 🏓",
flags: MessageFlags.Ephemeral,
},
});
}
});
client.connect();
```
More examples on the [GitHub repository](https://github.com/sergiogotuzzo/disgroove/tree/main/examples)