mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
2c3692810d
* structures: rename structure create functions * fix: errors occured because of structure rename * fix(controllers): errors occured because of structure rename * fix * fix createServer to createGuild rename * rename create*structure to create*Struct * update docs * Phew * rename createguildrole * fix that * fmt? * idk * why * fixxess * Update member.ts * Update member.ts * ahh found it * revert this * Update mod.ts Co-authored-by: ayntee <ayyantee@gmail.com>
33 lines
1.1 KiB
TypeScript
33 lines
1.1 KiB
TypeScript
import { Channel, createChannelStruct } from "./channel.ts";
|
|
import { createGuildStruct, Guild } from "./guild.ts";
|
|
import { createMemberStruct, Member } from "./member.ts";
|
|
import { createMessageStruct, Message } from "./message.ts";
|
|
import { createRoleStruct, Role } from "./role.ts";
|
|
import { createTemplateStruct, Template } from "./template.ts";
|
|
|
|
/** This is the placeholder where the structure creation functions are kept. */
|
|
export let structures = {
|
|
createChannelStruct,
|
|
createGuildStruct,
|
|
createMemberStruct,
|
|
createMessageStruct,
|
|
createRoleStruct,
|
|
createTemplateStruct,
|
|
};
|
|
|
|
export type { Channel, Guild, Member, Message, Role, Template };
|
|
|
|
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,
|
|
};
|
|
}
|