Skip to content
This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
/ helly Public archive

🛰️ [WIP] A simple, typed, performance-focused Discord API Wrapper.

License

Notifications You must be signed in to change notification settings

davipatricio/helly

Repository files navigation

Helly

A Node.js wrapper for interfacing with Discord.


helly


⚠️ This library is not ready for production use.


Installation

Node.js 16.9.0 or newer is required.

Stable version

npm install helly
yarn add helly
pnpm add helly
Development version
npm install helly@dev
yarn add helly@dev
pnpm add helly@dev

Optional packages

  • bufferutil for a much faster WebSocket connection (npm install bufferutil)

  • utf-8-validate in combination with bufferutil for much faster WebSocket processing (npm install utf-8-validate)

Ping Pong Example

const { Client, Events, GatewayIntentBits } = require('helly');

const client = new Client({
    intents: [GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent]
});

// Code inside here will run when the bot connects to the Discord API
client.on(Events.Ready /* you can also use 'Ready', but using enums are recommended */, () => {
    console.log("Ready!"); // Log "Ready!"
});


// Code inside here will run when someone sends a message in a channel
client.on(Events.MessageCreate /* you can also use 'MessageCreate', but using enums are recommended */, (message) => {
  if (message.content === '!ping') return message.reply(`🏓 ${client.ping}ms...`)
  if (message.content === 'Hi') return message.reply(`Hello, ${message.author}! How are you?`)
})

// Replace TOKEN with your bot account's token
client.login('TOKEN')

Useful Links

About

🛰️ [WIP] A simple, typed, performance-focused Discord API Wrapper.

Topics

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published