mirror of
https://github.com/discordeno/discordeno.git
synced 2026-05-30 23:40:07 +00:00
remove the raw prop
This commit is contained in:
@@ -24,8 +24,6 @@ import { logYellow } from "../utils/logger.ts";
|
||||
export function createChannel(data: ChannelCreatePayload, guildID?: string) {
|
||||
const channel = {
|
||||
...data,
|
||||
/** The raw channel data */
|
||||
raw: data,
|
||||
/** The guild id of the channel if it is a guild channel. */
|
||||
guildID: guildID || data.guild_id,
|
||||
/** The id of the last message sent in this channel */
|
||||
|
||||
@@ -34,8 +34,6 @@ import { requestAllMembers } from "../module/shardingManager.ts";
|
||||
export const createGuild = (data: CreateGuildPayload) => {
|
||||
const guild = {
|
||||
...data,
|
||||
/** The raw create guild payload data. */
|
||||
raw: data,
|
||||
/** The owner id of the guild. */
|
||||
ownerID: data.owner_id,
|
||||
/** The afk channel id for this guild. */
|
||||
|
||||
@@ -22,8 +22,6 @@ export const createMember = (data: MemberCreatePayload, guild: Guild) => {
|
||||
|
||||
return {
|
||||
...data,
|
||||
/** The complete raw data from the member create payload */
|
||||
raw: data,
|
||||
/** When the user joined the guild */
|
||||
joinedAt: Date.parse(data.joined_at),
|
||||
/** When the user used their nitro boost on the server. */
|
||||
|
||||
@@ -13,7 +13,6 @@ import { cache } from "../utils/cache.ts";
|
||||
export function createMessage(data: MessageCreateOptions) {
|
||||
const message = {
|
||||
...data,
|
||||
raw: data,
|
||||
channelID: data.channel_id,
|
||||
guildID: data.guild_id,
|
||||
mentionsEveryone: data.mentions_everyone,
|
||||
|
||||
@@ -2,8 +2,6 @@ import { RoleData } from "../types/role.ts";
|
||||
|
||||
export const createRole = (data: RoleData) => ({
|
||||
...data,
|
||||
/** The entire raw Role data */
|
||||
raw: data,
|
||||
/** The @ mention of the role in a string. */
|
||||
mention: `<@&${data.id}>`,
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user