MyGit

v9.0.1

discordeno/discordeno

版本发布时间: 2020-09-27 09:08:02

discordeno/discordeno最新发布版本:18.0.0(2023-01-13 07:50:21)

Version 9 is all about flexibility and customizability. It allows you to dig in and make Discordeno work exactly how you want it to. Had to do 9.0.1 because I had a silly mistake in forgetting to publish deps.ts to nest.land for the 9.0.0.

Previous Errors:

error: Uncaught Error: REQUEST_CLIENT_ERROR
      throw new Error(Errors.REQUEST_CLIENT_ERROR);
            ^
    at handleStatusCode (requestManager.ts:314:13)
    at Object.callback (requestManager.ts:233:9)
    at async requestManager.ts:101:28

New Errors:

{
  type: "error",
  data: {
    method: "patch",
    url: "https://discord.com/api/v8/guilds/223909216866402304/members/130136895395987456",
    body: { nick: "test" },
    retryCount: 0,
    bucketID: undefined,
    errorStack: Error: Location In Your Files:
    at runMethod (requestManager.ts:201:9)
    at Object.patch (requestManager.ts:133:12)
    at editMember (member.ts:185:25)
    at Object.messageCreate (debug.ts:36:9)
    at Object.handleInternalMessageCreate [as MESSAGE_CREATE] (messages.ts:50:32)
  }
}

This guide is for everything below: https://discordeno.mod.land/advanced/customizations

Note this is meant for advanced developers. Do not use this if you are not advanced enough. Powerful but dangerous. With great power comes great bugs!

Controllers

Controllers are one of the most powerful features of Discordeno. They allow you to take control of how Discordeno handles the Discord payloads from the gateway. When an event comes in, you can override and control how you want it to work. For example, if your bot does not use emojis at all, you could simply just take control over the GUILD_EMOJIS_UPDATE event and prevent anyone from caching any emojis at all. Another example, is if you are building a custom module/framework around Discordeno and you want to provide more custom events such as when someone boosts the server or some other custom event this is possible as well.

Structures

Discordeno provides the ability to customize structures. You have the ability to override the function that creates the structures inside Discordeno. THIS DOES NOT MODIFY THE PROTOTYPE! I wanted to make sure that Discordeno handled this without encouraging bad practices such as prototype pollution which can make your bots inherintly unstable and unpredictable. Discordeno allows you to take control over the functions that create the structures. In fact, if u really wanted to get fancy you could even return entire classes inside that function and the member could become a class if u want.

Custom Cacher

One of the features that Discordeno has is the ability to customize the cache. In order to do this, we will simply override the cache handlers. For example, you could use Redis caching if you like. Using this, you will be able to control where your cache is stored, how its handled and much more.

相关地址:原始地址 下载(tar) 下载(zip)

查看:2020-09-27发行的版本