mirror of
https://github.com/discordeno/discordeno.git
synced 2026-06-19 04:38:17 +00:00
add message.channel
This commit is contained in:
@@ -30,6 +30,9 @@ import { Member } from "./member.ts";
|
|||||||
import { Role } from "./role.ts";
|
import { Role } from "./role.ts";
|
||||||
|
|
||||||
const baseMessage: Partial<Message> = {
|
const baseMessage: Partial<Message> = {
|
||||||
|
get channel() {
|
||||||
|
return cache.channels.get(this.channelID!);
|
||||||
|
},
|
||||||
get guild() {
|
get guild() {
|
||||||
if (!this.guildID) return;
|
if (!this.guildID) return;
|
||||||
return cache.guilds.get(this.guildID);
|
return cache.guilds.get(this.guildID);
|
||||||
@@ -207,6 +210,8 @@ export interface Message {
|
|||||||
|
|
||||||
// GETTERS
|
// GETTERS
|
||||||
|
|
||||||
|
/** The channel where this message was sent. Can be undefined if uncached. */
|
||||||
|
channel?: Channel;
|
||||||
/** The guild of this message. Can be undefined if not in cache or in DM */
|
/** The guild of this message. Can be undefined if not in cache or in DM */
|
||||||
guild?: Guild;
|
guild?: Guild;
|
||||||
/** The member for the user who sent the message. Can be undefined if not in cache or in dm. */
|
/** The member for the user who sent the message. Can be undefined if not in cache or in dm. */
|
||||||
|
|||||||
Reference in New Issue
Block a user