A simple way to make your discord bot with snowlight.js
- Low Memory Usage
- Custom Cache System
- Fast Connect to Gateway
It's a raw connect gateway discord.
- Discord Developer Portal: https://discord.com/developers/applications
- Install the package
npm install @snowlightjs/client | yarn add @snowlightjs/client | bun install @snowlightjs/client
- Create a new file and paste the following code
// index.ts
import { Client } from "@snowlightjs/client";
const client = new Client({
token: "YOUR_BOT_TOKEN", // Your bot token,
api_version: "v10",
intents: 1, // Intents: discord.com/developers/docs/topics/gateway#gateway-intents | https://discord-intents-calculator.vercel.app/
})
client.login(); // Connect to gateway
client.ws.on("debug", console.log);
client.on("ready", () => {
console.log(`Logged in as ${client.user.username}`);
});