4.1.5 • Published 2 years ago
addox v4.1.5
ADDOX
About
addox is an easy-to-use Node.js library for interacting with the Discord API's.
Installation
npm install addox
yarn add addox
Warn
Node.js v16.6.0 or higher is required.
Features
- Easy to use
- Object-oriented
- Lightweight
- Fast
- TypeScript support
Optional Dependencies
- zlib-sync for WebSocket data compression and decompression
- erlpack for WebSocket data serialization and deserialization
Example ping-pong
const {
Client,
ApplicationCommandBuilder,
EmbedBuilder,
ButtonBuilder,
ActionRowBuilder,
} = require('addox');
const client = new Client({
ws: {
intents: ['Guilds'],
},
});
client.ws.on('ready', () => {
const commands = [
new ApplicationCommandBuilder().setName('ping').setDescription('Replies with pong!')
];
client.caches.commands
.set(commands)
.then(() => console.log('Application commands (/) registered!'))
.catch(console.error);
console.log(`Logged in as ${client.user.tag}!`);
});
client.ws.on('interactionCreate', async (interaction) => {
if (interaction.type === 'ApplicationCommand' && interaction.commandType === 'ChatInput') {
switch (interaction.commandName) {
case 'ping':
await interaction.reply({
content: `Pong! **${client.ws.ping}**ms`,
});
break;
}
}
});
client.ws.connect('your-super-secret-token');
Useful Links
Contributing
If you want to contribute to addox, you can do so by forking the repository and submitting a pull request.
3.0.0
2 years ago
4.1.3
2 years ago
4.1.5
2 years ago
4.1.0
2 years ago
4.0.0
2 years ago
2.4.0-dev.14
2 years ago
2.4.0-dev.13
2 years ago
2.4.0-dev.12
2 years ago
2.4.0-dev.11
2 years ago
2.4.0-dev.10
2 years ago
2.4.0-dev.9
2 years ago
2.4.0-dev.8
2 years ago
2.4.0-dev.7
2 years ago
2.4.0-dev.6
2 years ago
2.4.0-dev.5
2 years ago
2.4.0-dev.4
2 years ago
2.4.0-dev.3
3 years ago
2.4.0-dev.2
3 years ago
2.4.0-dev.1
3 years ago
2.3.0-dev.1
3 years ago
2.1.7
3 years ago
2.1.6
3 years ago
2.1.3
3 years ago
2.0.0
3 years ago
1.7.1
3 years ago
1.7.0
3 years ago
1.5.4
3 years ago
1.5.3
3 years ago
1.5.2
3 years ago
1.5.0
3 years ago
1.4.0
3 years ago
1.2.9
3 years ago
1.2.8
3 years ago
1.2.7
3 years ago
1.2.6
3 years ago
1.2.5
3 years ago
1.2.4
3 years ago
1.2.0
3 years ago
1.1.3
3 years ago
1.1.2
3 years ago
1.1.0
3 years ago
1.0.0
3 years ago