4.1.5 • Published 1 year ago

addox v4.1.5

Weekly downloads
-
License
GPL-3.0
Repository
github
Last release
1 year ago

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

1 year ago

4.1.3

1 year ago

4.1.5

1 year ago

4.1.0

1 year ago

4.0.0

1 year ago

2.4.0-dev.14

1 year ago

2.4.0-dev.13

1 year ago

2.4.0-dev.12

1 year ago

2.4.0-dev.11

1 year ago

2.4.0-dev.10

1 year ago

2.4.0-dev.9

1 year ago

2.4.0-dev.8

1 year ago

2.4.0-dev.7

1 year ago

2.4.0-dev.6

1 year ago

2.4.0-dev.5

1 year ago

2.4.0-dev.4

1 year ago

2.4.0-dev.3

1 year ago

2.4.0-dev.2

1 year ago

2.4.0-dev.1

1 year ago

2.3.0-dev.1

1 year ago

2.1.7

2 years ago

2.1.6

2 years ago

2.1.3

2 years ago

2.0.0

2 years ago

1.7.1

2 years ago

1.7.0

2 years ago

1.5.4

2 years ago

1.5.3

2 years ago

1.5.2

2 years ago

1.5.0

2 years ago

1.4.0

2 years ago

1.2.9

2 years ago

1.2.8

2 years ago

1.2.7

2 years ago

1.2.6

2 years ago

1.2.5

2 years ago

1.2.4

2 years ago

1.2.0

2 years ago

1.1.3

2 years ago

1.1.2

2 years ago

1.1.0

2 years ago

1.0.0

2 years ago