GuildChannel - truemedian/Discordia GitHub Wiki
Inherits Channel
Abstract base class that defines the base methods and/or properties for all Discord guild channels.
setName
setCategory
moveUp
moveDown
createInvite
getInvites
getPermissionOverwriteFor
delete
permissionOverwrites
name
position
guild
categoryInherited from Container
client
parentInherited from Snowflake
id
createdAt
timestampInherited from Channel
type
mentionString
Sets the channel's name. This must be between 2 and 100 characters in length.
Name Type name string Returns: boolean
Sets the channel's parent category.
Name Type id Channel ID Resolvable Returns: boolean
Moves a channel up its list. The parameter
n
indicates how many spaces the channel should be moved, clamped to the highest position, with a default of 1 if it is omitted. This will also normalize the positions of all channels.
Name Type n number Returns: boolean
Moves a channel down its list. The parameter
n
indicates how many spaces the channel should be moved, clamped to the lowest position, with a default of 1 if it is omitted. This will also normalize the positions of all channels.
Name Type n number Returns: boolean
Creates an invite to the channel. Optional payload fields are: - max_age:number time in seconds until expiration, default = 86400 (24 hours) - max_uses:number total number of uses allowed, default = 0 (unlimited) - temporary:boolean whether the invite grants temporary membership, default = false - unique:boolean whether a unique code should be guaranteed, default = false
Name Type payload table Returns: Invite
Returns a newly constructed cache of all invite objects for the channel. The cache and its objects are not automatically updated via gateway events. You must call this method again to get the updated objects.
Returns: Cache
Returns a permission overwrite object corresponding to the provided member or role object. If a cached overwrite is not found, an empty overwrite with zero-permissions is returned instead. Therefore, this can be used to create a new overwrite when one does not exist. Note that the member or role must exist in the same guild as the channel does.
Name Type obj Role Returns: PermissionOverwrite
Permanently deletes the channel. This cannot be undone!
Returns: boolean
An iterable cache of all overwrites that exist in this channel. To access an overwrite that may exist, but is not cached, use
GuildChannel:getPermissionOverwriteFor
.Type: Cache
The name of the channel. This should be between 2 and 100 characters in length.
Type: string
The position of the channel, where 0 is the highest.
Type: number
The guild in which this channel exists.
Type: Guild
The parent channel category that may contain this channel.
Type: GuildCategoryChannel|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