discord-minimal
TypeScript icon, indicating that this package has built-in type declarations

0.1.76 • Public • Published

Logo Logo by JCOnline



This project was started as a replacement for DiscordJS because I simply didn't need a majority of the more "advanced" features that were offered and instead just needed a really simple light weight Wrapper for the Discord API.

Here's an example of a basic bot you can make with this library:

const { DiscordMinimal, INTENTS } = require('discord-minimal');

const client = new DiscordMinimal([ INTENTS.GUILDS, INTENTS.GUILD_MESSAGES, INTENTS.MESSAGE_CONTENT ]);

client.once('ready', () => {
    console.log(`Logged in!`);
});

client.on('messageCreate', message => {
    if (message.content === 'hello') {
        message.reply(`Hello ${message.author.username}!`);
    }
});

// you should store this token securely in a .env or config file
// this file should not be commited to version control or shared with anybody
// the token gives malicious actors access to your bot
client.login('token goes here');

Readme

Keywords

none

Package Sidebar

Install

npm i discord-minimal

Weekly Downloads

7

Version

0.1.76

License

MIT

Unpacked Size

1.89 MB

Total Files

1661

Last publish

Collaborators

  • turkeydev