UNPKG

discord-rb

Version:

Discord.rb is a library for interacting with the Discord API.

27 lines (18 loc) 764 B
const User = require("../actions/User.js") const Channel = require("../actions/Channel.js") const Member = require("../actions/Member.js") const Guild = require("../actions/Guild.js") const _Message = require("../actions/Message.js") //represents a message on discord. class Message { constructor() {} async getData(data, token) { const MessageData = await _Message(data.channel_id, data.id, token) MessageData.User = await User(data.author.id, token) MessageData.Channel = await Channel(data.channel_id, token) MessageData.Member = await Member(data.guild_id, data.author.id, token) MessageData.Guild = await Guild(data.guild_id, token) return MessageData } } module.exports = Message