/discord-library-opensource

A simple open-source WebSocket library for building Discord bots, allowing real-time communication and easy event handling.

Apache License 2.0Apache-2.0

Discord Library Opensource

an open-source library that enables real-time communication with the Discord API using WebSockets. Perfect for developers creating Discord bots, this library simplifies event management and allows for seamless updates and customizations to your projects.

Usage

// Get started by editing `bot/client.js`

const { Client } = require('../src/package');
const bot = new Client(process.env['DISCORD_BOT_TOKEN'], {
    intents: [
      'GUILDS'
    ]
})

bot.on('ready', async() => {
    console.log(`${bot.user.username}'s Online.`)
})

bot.on('messageCreate', Message => {
    if(Message.content === 'opensource') {
        Message.reply({ content: 'An opensource project is good 😁.' })
    }
})

bot.connect();