remove the raw prop

This commit is contained in:
Skillz
2020-05-21 23:27:01 -04:00
parent 83ee905a0f
commit bb9d104f4e
5 changed files with 0 additions and 9 deletions

View File

@@ -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 */

View File

@@ -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. */

View File

@@ -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. */

View File

@@ -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,

View File

@@ -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}>`,
});