1.0.0-a3 • Published 2 years ago

@discall/core v1.0.0-a3

Weekly downloads
-
License
ISC
Repository
github
Last release
2 years ago

@discall/core

npm.io

A async functional discord API wrapper written in bun.

It let you process everything with function. (ex. message, reaction, voice, etc.)

Why do I want to make this library?


because I want practice my code skill and make it for my another project.

and I hope it can be more convenient for everyone.

Example


How to let bot online? It is a simple way to do this.

let send = bot("TOKEN", {
    intents: defaultIntents(),
    prefix: "!"
});

register({
    name: EventName.Ready,
    listener: async (data: ReadyEventData) => {
        console.log("bot is online");
    }
});

You will see there is so different to another package.

There is no Bot Object.

Instead, here is a send function.

It is for send Https Request, and it accept our format.

Request Format


{
    uri: (base: URL) => { uri: string, mode: HttpMode };
    data?: any;
    cache?: () => any | (data: any) => any;
    reason?: string;
}
modeuridatareasoncache
GET | DELETEx-?
POST | PUT-?
NONExxx
checkmeaning
xunable
necessary
?optional
-according method

Other Docs


Please see our docs directory, here

To do list

Interactions


  • ApplicationCommand
  • MessageComponents
  • InteractionResponse

Resources


  • Audit Log
  • Auto Moderation
  • Channel
  • Emoji
  • Guild
  • Guild Scheduled Event
  • Guild Template
  • Invite
  • Stage Instance
  • Sticker
  • User
  • Voice
  • Webhook

Topics


  • Gateway
  • Voice Connections

Extra


  • Command
  • CommandPermission
  • CommandChannel
  • InteractionResponse