1.0.5 • Published 3 months ago
astralisia v1.0.5
Astralisia
Astralisia creates advanced Discord bots easily.
Astralisia is a package that streamlines the development of Discord bots, offering a simple and efficient approach built upon the discord.js library.
Installation
Start your project using Bun:
bun init
Then, add Astralisia and discord.js:
bun add astralisia
bun add discord.js
Configuration
Set up your environment for TypeScript or JavaScript and in the main file, insert the following code:
import { Astralisia } from "astralisia";
import { GatewayIntentBits, Partials } from "discord.js";
const client = new Astralisia({
intents: [GatewayIntentBits.Guilds],
partials: [Partials.User],
});
client.eventsPath("src/test/events/**/**/*.js");
client.commandsPath("src/test/commands/**/**/*.js");
client.login("bot token");
Usage
Create commands or events in the specified folders using the eventsPath()
or commandsPath()
functions.
Command Example:
import { SlashCommand } from "../../../lib/class/commands";
export default new SlashCommand({
data: {
name: "ping",
description: "Responds with Pong!",
},
async execute({ interaction }) {
interaction.reply({ content: "Pong!" });
},
});
Event Example:
import { Event } from "../../../lib/class/events";
export default new Event({
name: "ready",
once: true,
execute: async (client) => {
console.log("Connected as", client.user?.tag);
},
});
Note
Although autocomplete support is not yet available, Astralisia is continuously evolving, with more features planned to further streamline bot development.
Support
For more information or support, visit our official server: server link.