0.8.2 • Published 1 year ago

phasebot v0.8.2

Weekly downloads
-
License
MIT
Repository
github
Last release
1 year ago

Phasebot

npm

Phasebot provides an array of utilities for building and running bots with discord.js.

It handles the boilerplate code for you, and provides a useful CLI tool for speedily running and compiling your code using the full power of the bun runtime and bundler.

Note: Since the CLI heavily relies on bun to work, only the bun runtime is supported at the moment. I plan to add support for other runtimes like Node.js and Deno in the future.

Getting Started

First, install both the phasebot and discord.js packages:

bun install phasebot discord.js

Then create a phase.config.{ts,js,cjs,mjs} file in your project root, and copy in the following code:

import { ActivityType, Partials } from "discord.js"
import { setConfig } from "phasebot"

export default setConfig({
  intents: [
    // Add your intents here ...
  ],
  partials: [
    // Add your partials here ...
  ],
  presence: {
    activities: [
      {
        name: "🟢 I'm online!",
        type: ActivityType.Custom,
      },
    ],
    status: "online",
  },
})

After that, make a .env file in your project root, and add the following:

DISCORD_TOKEN="your-bot-token"

Then finally, start the bot in your terminal with the following command:

bun run phase dev

And that's it! Your bot is now running and ready to go.

More documentation coming soon!

0.8.1

1 year ago

0.8.0

1 year ago

0.8.2

1 year ago

0.5.0

1 year ago

0.4.0

1 year ago

0.7.0

1 year ago

0.6.1

1 year ago

0.6.0

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago