GroupChannel - truemedian/Discordia GitHub Wiki
Inherits TextChannel
Represents a Discord group channel. Essentially a private channel that may have more than one and up to ten recipients. This class should only be relevant to user-accounts; bots cannot normally join group channels.
setName
setIcon
addRecipient
removeRecipient
leaveInherited from TextChannel
getMessage
getFirstMessage
getLastMessage
getMessages
getMessagesAfter
getMessagesBefore
getMessagesAround
getPinnedMessages
broadcastTyping
send
sendf
recipients
name
ownerId
owner
icon
iconURLInherited from Container
client
parentInherited from Snowflake
id
createdAt
timestampInherited from Channel
type
mentionStringInherited from TextChannel
messages
Sets the channel's name. This must be between 1 and 100 characters in length.
Name Type name string Returns: boolean
Sets the channel's icon. To remove the icon, pass
nil
.
Name Type icon Base64 Resolvable Returns: boolean
Adds a user to the channel.
Name Type id User ID Resolvable Returns: boolean
Removes a user from the channel.
Name Type id User ID Resolvable Returns: boolean
Removes the client's user from the channel. If no users remain, the channel is destroyed.
Returns: boolean
Inherited from TextChannel
Gets a message object by ID. If the object is already cached, then the cached object will be returned; otherwise, an HTTP request is made.
Name Type id Message ID Resolvable Returns: Message
Returns the first message found in the channel, if any exist. This is not a cache shortcut; an HTTP request is made each time this method is called.
Returns: Message
Returns the last message found in the channel, if any exist. This is not a cache shortcut; an HTTP request is made each time this method is called.
Returns: Message
Returns a newly constructed cache of between 1 and 100 (default = 50) message objects found in the channel. While the cache will never automatically gain or lose objects, the objects that it contains may be updated by gateway events.
Name Type Optional limit number x Returns: SecondaryCache
Returns a newly constructed cache of between 1 and 100 (default = 50) message objects found in the channel after a specific point. While the cache will never automatically gain or lose objects, the objects that it contains may be updated by gateway events.
Name Type Optional id Message ID Resolvable limit number x Returns: SecondaryCache
Returns a newly constructed cache of between 1 and 100 (default = 50) message objects found in the channel before a specific point. While the cache will never automatically gain or lose objects, the objects that it contains may be updated by gateway events.
Name Type Optional id Message ID Resolvable limit number x Returns: SecondaryCache
Returns a newly constructed cache of between 1 and 100 (default = 50) message objects found in the channel around a specific point. While the cache will never automatically gain or lose objects, the objects that it contains may be updated by gateway events.
Name Type Optional id Message ID Resolvable limit number x Returns: SecondaryCache
Returns a newly constructed cache of up to 50 messages that are pinned in the channel. While the cache will never automatically gain or lose objects, the objects that it contains may be updated by gateway events.
Returns: SecondaryCache
Indicates in the channel that the client's user "is typing".
Returns: boolean
Sends a message to the channel. If
content
is a string, then this is simply sent as the message content. If it is a table, more advanced formatting is allowed. See managing messages for more information.
Name Type content string Returns: Message
Sends a message to the channel with content being formatted with
...
viastring.format
Name Type content string ... * Returns: Message
A secondary cache of users that are present in the channel.
Type: SecondaryCache
The name of the channel.
Type: string
The Snowflake ID of the user that owns (created) the channel.
Type: string
Equivalent to
GroupChannel.recipients:get(GroupChannel.ownerId)
.Type: User|nil
The hash for the channel's custom icon, if one is set.
Type: string|nil
The URL that can be used to view the channel's icon, if one is set.
Type: string|nil
Inherited from Container
A shortcut to the client object to which this container is visible.
Type: Client
The parent object of to which this container is a child. For example, the parent of a role is the guild in which the role exists.
Type: Container|Client
Inherited from Snowflake
The Snowflake ID that can be used to identify the object. This is guaranteed to be unique except in cases where an object shares the ID of its parent.
Type: string
The Unix time in seconds at which this object was created by Discord. Additional decimal points may be present, though only the first 3 (milliseconds) should be considered accurate.
Type: number
The date and time at which this object was created by Discord, represented as an ISO 8601 string plus microseconds when available.
Equivalent to Date.fromSnowflake(Snowflake.id):toISO()
.
Type: string
Inherited from Channel
The channel type. See the
channelType
enumeration for a human-readable representation.Type: number
A string that, when included in a message content, may resolve as a link to a channel in the official Discord client.
Type: string
Inherited from TextChannel
An iterable weak cache of all messages that are visible to the client. Messages that are not referenced elsewhere are eventually garbage collected. To access a message that may exist but is not cached, use
TextChannel:getMessage
.Type: WeakCache