0.0.4 • Published 8 months ago

wumpcli v0.0.4

Weekly downloads
-
License
MIT
Repository
github
Last release
8 months ago

WumpCli

WumpCli is a customized Discord.JS API that uses a more service-based approach to creating discord bots similar to how Roblox Studio uses services

const { Client } = require('wumpcli');
const client = new Client(/* stuff */);


client.on("ready", (ctx) => {
    console.log(`logged in as ${ctx.user.username}`);
});


new client.EventService; // imports the event service for creating events
let cmd = new client.CommandService; // imports the command service for creating slash commands
let channels = new client.ChannelService; // imports the channel service


let event = new Event();
client.events.push("pingCmd", event);


client.on("pingCmd", async (ctx) => {
    let channel = await channels.get("channel id");
    channel.send(`ping command ran by ${ctx.author} in guild ${ctx.guild.name} (${ctx.guild.id})`);
});


cmd.create("ping", "replies with pong", (ctx) => {
    ctx.reply("pong!");
    event.fire(ctx);
});


client.login(token);

Collaborators

0.0.4

8 months ago

0.0.3

8 months ago

0.0.2

8 months ago

0.0.1

8 months ago

0.0.0

8 months ago