1.5.5 • Published 1 year ago

@hawkdotjs/typings v1.5.5

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

About

@hawkdotjs/typings Is An Advanced DJS Bot Typings with TypeScript.

Installation

Note: Node.js 19.0.0 or newer is required.

npm install @hawkdotjs/typings

Example Usage

CommonJS

const { CommandBuilder, EventBuilder } = require("@hawkdotjs/typings");

// Command
const HelloWorldCommand = new CommandBuilder()
  .setScope("Global")
  .setCategory("Fun")
  .setData(
    data => data
    .setName("helloworld")
    .setDescription('Replies with "Hello World!"')
  )
  .onExecute(async interaction => {
    await interaction.reply("Hello World!")
  });

// Event
const ReadyEvent = new EventBuilder()
  .setName("ready")
  .onExecute(() => {
    return console.log("Bot is online.")
  });

ESM Module

import { CommandBuilder, EventBuilder } from "@hawkdotjs/typings";

// Command
const HelloWorldCommand = new CommandBuilder()
  .setScope("Global")
  .setCategory("Fun")
  .setData(
    data => data
    .setName("helloworld")
    .setDescription('Replies with "Hello World!"')
  )
  .onExecute(async interaction => {
    await interaction.reply("Hello World!")
  });

// Event
const ReadyEvent = new EventBuilder()
  .setName("ready")
  .onExecute(() => {
    return console.log("Bot is online.")
  });

Links

1.5.5

1 year ago

1.5.4

1 year ago

1.5.3

1 year ago

1.5.2

1 year ago

1.5.1

1 year ago

1.5.0

1 year ago

1.4.5

1 year ago

1.4.0

1 year ago

1.3.5

1 year ago

1.3.0

1 year ago

1.2.5

1 year ago

1.2.0

1 year ago

1.1.5

1 year ago

1.1.0

1 year ago

1.0.5

1 year ago

1.0.0

1 year ago