atom-djs-framework

A kinda discord.js framework with a Command and Event handler as well as a slightly extended client with database manager.

Usage no npm install needed!

<script type="module">
  import atomDjsFramework from 'https://cdn.skypack.dev/atom-djs-framework';
</script>

README

A kinda discord.js framework with a Command and Event handler aswell as a slightly extended client with database manager.

Very much a WIP and adjusted to my own needs

require("dotenv").config();
import { Client } from "atom-djs-framework";

const client = new Client({
    database: {
        mongoConnectionString: "mongodb+srv://<username>:<password>@<database>.yy0ym.mongodb.net/Shared?retryWrites=true&w=majority",
        database: "mongoose"
    },
    commandsPath: "./commands",
    eventsPath: "./events"
});
client.start(process.env.TOKEN);
//commands/main
import { Command } from "atom-djs-framework";

export default new Command({
    name: "ping",
    description: "Replies with pong",
    run: ({ interaction }) => {
        interaction.followUp("Pong!") ; 
    }
});
//events/main
import { Event } from "atom-djs-framework";

export default new Event("message", message => {
    if(message.content === "hi"){
        message.channel.send("Hello!");
    }
});