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

0.0.2 • Public • Published

Examples

Setup

const dbd = require("luesscript")

const bot = new dbd.Bot({
token: "TOKEN", //Discord Bot Token
prefix: "!" //Customizable
})
bot.onMessage() //Allows to run Commands

bot.command({
name: "ping", //Trigger name (command name)
code: `$ping Pong!` //Code
})

Variables

What are variables? They can be used for many things, especially allowing to save data.

This allows to create potential currency system, level system, etc.

bot.variables({
  VariableName1: "Value", //Returns "Value"
  VariableName2: "Value2" //Returns "Value2"
})

Callbacks

What are callbacks?

It's simple and easy process, it essentially allows you to run events, such as user joining a Guild. This will trigger a event, causing a code to be executed such as.

bot.joinCommand({
        channel: "Channel ID", //Enter a Channel ID
        code: `<@$authorID> just joined, welcome!` //This can be changed
})
bot.onJoined()

Slash Commands

With easy and simple functions, you can make Slash Commands with your Bots quick!

bot.command({
    name: "slash",
    code: `$createSlashCommand[$guildID;version;Returns luesscript Version]`
})
bot.interactionCommand({
    name: "version", 
    code: `$interactionReply[$packageVersion]`
})
bot.onInteractionCreate()

Package Sidebar

Install

npm i luesscript

Weekly Downloads

3

Version

0.0.2

License

MIT

Unpacked Size

515 kB

Total Files

555

Last publish

Collaborators

  • luesscript