Merge branch 'next' of https://github.com/discordeno/discordeno into getters

This commit is contained in:
ayntee
2020-12-22 22:06:41 +04:00
61 changed files with 1251 additions and 363 deletions
+30
View File
@@ -0,0 +1,30 @@
import { createChannel } from "./channel.ts";
import { createGuild } from "./guild.ts";
import { createMember } from "./member.ts";
import { createMessage } from "./message.ts";
import { createRole } from "./role.ts";
import { createTemplate } from "./template.ts";
/** This is the placeholder where the structure creation functions are kept. */
export let structures = {
createChannel,
createGuild,
createMember,
createMessage,
createRole,
createTemplate,
};
export type Structures = typeof structures;
/** This function is used to update/reload/customize the internal structures of Discordeno.
*
* ⚠️ **ADVANCED USE ONLY: If you customize this incorrectly, you could potentially create many new errors/bugs.
* Please take caution when using this.**
*/
export function updateStructures(newStructures: Structures) {
structures = {
...structures,
...newStructures,
};
}