mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-16 19:28:17 +00:00
refactor(structures): rename create* functions (#395)
* 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>
This commit is contained in:
@@ -107,7 +107,10 @@ const baseGuild: Partial<Guild> = {
|
||||
},
|
||||
};
|
||||
|
||||
export async function createGuild(data: CreateGuildPayload, shardID: number) {
|
||||
export async function createGuildStruct(
|
||||
data: CreateGuildPayload,
|
||||
shardID: number,
|
||||
) {
|
||||
const {
|
||||
disovery_splash: discoverySplash,
|
||||
default_message_notifications: defaultMessageNotifications,
|
||||
@@ -143,11 +146,14 @@ export async function createGuild(data: CreateGuildPayload, shardID: number) {
|
||||
} = data;
|
||||
|
||||
const roles = await Promise.all(
|
||||
data.roles.map((role) => structures.createRole(role)),
|
||||
data.roles.map((role) => structures.createRoleStruct(role)),
|
||||
);
|
||||
|
||||
await Promise.all(channels.map(async (channel) => {
|
||||
const channelStruct = await structures.createChannel(channel, rest.id);
|
||||
const channelStruct = await structures.createChannelStruct(
|
||||
channel,
|
||||
rest.id,
|
||||
);
|
||||
return cacheHandlers.set("channels", channelStruct.id, channelStruct);
|
||||
}));
|
||||
|
||||
|
||||
Reference in New Issue
Block a user