discord-spot
TypeScript icon, indicating that this package has built-in type declarations

0.0.3 • Public • Published

Spot

Spot: Take the hassle of making a discord bot.

Installation

Run the following command in your node project:

npm i discord-spot

Example

import {
    Spot,
    Command,
    CommandListener,
    EventListener,
    Event,
    Message
} from "discord-spot";

@CommandListener
@EventListener
class TestBot extends Spot {

    constructor() {
        super();

        this.run();
    }

    @Event("ready")
    onReady(spot: Spot) {
        console.log("Bot is ready.")
    }

    @Command("ping")
    flip(spot: Spot, message: Message, args: string[]) {
        message.reply("Pong!");
    }
}

new TestBot();

This code creates a ready event and a ping command. For the bot to run, you will need to provide a token in your 'bot.config.ts' You must provide a name and a token.

import { SpotConfiguration } from "discord-spot";

export default {
    name: "Your Bot Name",
    token: "Your Bot Token"
} as SpotConfiguration;

Support

To get support for Spot join our discord

Package Sidebar

Install

npm i discord-spot

Weekly Downloads

1

Version

0.0.3

License

MIT

Unpacked Size

41.9 kB

Total Files

32

Last publish

Collaborators

  • micc281