Giter VIP home page Giter VIP logo

brickord.js's Introduction

Brickord

A command framework for Discord.JS Bots


Getting started

This will be a quick guide on how to setup your own Brickord bot in minutes. I recommend using TypeScript, since it will give you hints and help you prevent bugs before even running the bot. You might find it easier to use JavaScript when getting started tho.

Installation

To use Brickord, you need to install brickord.js ontop of discord.js and @discordjs/builders

npm i discord.js @discordjs/builders brickord.js

You can alternatively install the latest version from the git repository

npm i discord.js @discordjs/builders git+https://github.com/Brycked/brickord.js.git

Setting up the bot

Setting up the bot is quite similar to how you would do in discord.js. Create a file called index.ts and create a client object. Additionally, you need to specify the command prefix.

import { Client } from 'brickord.js'

const client = new Client({
  intents: ['GUILDS', 'GUILD_MESSAGES'],
  prefix: '!'
})

client.login(TOKEN) // your token goes here

Replace TOKEN with the bot token that you got when creating your bot.

The bot will search for commands in the ./commands directory and events in the ./events directory. Create those folders and provide the main file in your package.json

{
  "name": "my-epok-bot",
  "main": "index.ts"
}

Your project should now look similar to this:

├── commands/
├── events/
├── node_modules/
├── index.ts
└── package.json

Now you can open the terminal and run your new bot!

ts-node index.ts

brickord.js's People

Contributors

brckd avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.