refactor!: organize directories and files (#268)

* refactor!: organize directory structure

* fix: avoid stack overflow err

* chore: swtch back to std/encoding for base64

* style: format source files
This commit is contained in:
Ayyan
2020-12-22 21:26:27 +04:00
committed by GitHub
parent 6ecff50d2b
commit e49a23687e
40 changed files with 118 additions and 101 deletions
+29
View File
@@ -0,0 +1,29 @@
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 structure of Discordeno.
*
* ⚠️ **ADVANCED USE ONLY: If you customize this in a wrong way, you could potentially create many new errors/bugs. Please take caution when using this.
*/
export function updateStructures(newStructures: Structures) {
structures = {
...structures,
...newStructures,
};
}