Wondering what’s next for npm?Check out our public roadmap! »

This package has been deprecated

Author message:

jackbot-discord has been merged into NXTBOT (github.com/Jack5079/nxtbot)

jackbot-discordTypeScript icon, indicating that this package has built-in type declarations

14.0.0 • Public • Published

jackbot-discord

kinda makes it easier to make bots on discord

okay so here's a quick bot just to show how easy it is

Simple bot (Hello, world!)

// bot.ts
import Bot from 'jackbot-discord'
import { Message } from 'discord-js'
 
const bot = new Bot(
  {
    // The command list
    repeat (message: Message, args: string[]) {
      // Repeats what the user typed after
      message.channel.send(args.join(' '))
    }
  },
  {
    prefix: '-' // what's before every command
  }
)
 
bot.login('Your bot token here')

After opening the bot, do -repeat Hello, world!

Advanced bot

// bot.ts
import Bot from 'jackbot-discord'
import { Message } from 'discord-js'
 
const bot = new Bot(
  {
    // The command list
    "Can you please say": (message: Message, args: string[])=> {
      // Repeats what the user typed after
      message.channel.send(args.join(' '))
    }
  },
  {
    prefix: '' // what's before every command
  }
)
 
bot.login('Your bot token here')

After opening the bot, do Can you please say Hello, world!

Install

npm i jackbot-discord

DownloadsWeekly Downloads

42

Version

14.0.0

License

MIT

Unpacked Size

8.95 kB

Total Files

9

Last publish

Collaborators

  • avatar