Skip to content

Spot: Take the hassle out of making a Discord Bot

License

Notifications You must be signed in to change notification settings

Arcticlang/Spot

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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;

You can set enableMessageContent to true to enable Message Content, You must enable that in your Discord developer portal. Note: This option will be ignored if the useCustomCommands property is enabled.

Support

To get support for Spot join our discord

Credit

keqingrong/supports-ansi - Check whether terminal supports ANSI.

About

Spot: Take the hassle out of making a Discord Bot

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published