-
Notifications
You must be signed in to change notification settings - Fork 57
Natives (Channels)
Markski edited this page Nov 14, 2019
·
4 revisions
Don't forget: "Discord ID" is the actual ID that discord uses, whereas "Internal ID" is the integer needed to reference a given channel to the plugin. This is explained on the main page of this wiki.
- Usage:
DCC_FindChannelByName(const channel_name[])
, wherechannel_name
is the name of the channel. - Returns: Internal ID of the specified channel, with
DCC_Channel
tag.
- Usage:
DCC_FindChannelByID(const channel_id[])
, wherechannel_id
is the Discord ID of the channel. - Returns: Internal ID of the specified channel, with
DCC_Channel
tag.
- Usage:
DCC_GetChannelId(DCC_Channel:channel, dest[DCC_ID_SIZE], max_size = sizeof dest);
, where channel is the internal id for the given channel,dest
is an where the Discord ID will be stored as text, andmax_size
is the size of the given string. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_GetChannelType(DCC_Channel:channel, &DCC_ChannelType:type)
, wherechannel
is the internal id for the given channel, andtype
the variable where the channel type will be stored. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_GetChannelGuild(DCC_Channel:channel, &DCC_Guild:guild)
, wherechannel
is the internal id for the given channel, andguild
the variable where the guild the channel belongs to will be stored. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_GetChannelId(DCC_Channel:channel, dest[DCC_ID_SIZE], max_size = sizeof dest)
, wherechannel
is the internal id for the given channel,dest
is an where the channel's name will be stored as text, andmax_size
is the size of the given string. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_GetChannelTopic(DCC_Channel:channel, dest[DCC_ID_SIZE], max_size = sizeof dest)
, wherechannel
is the internal id for the given channel,dest
is an where the channel's topic will be stored as text, andmax_size
is the size of the given string. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_GetChannelPosition(DCC_Channel:channel, &position)
, wherechannel
is the internal id for the given channel, andposition
is the variable where the channel's position will be stored. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_IsChannelNsfw(DCC_Channel:channel, &bool:is_nsfw)
, wherechannel
is the internal id for the given channel, andis_nsfw
is a boolean which will indicate wether the channel is NSFW or not. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_GetChannelParentCategory(DCC_Channel:channel, &DCC_Channel:category)
, wherechannel
is the internal id for the given channel, andcategory
is a variable which will store the category the channel belongs to, if applicable, with a DCC_Channel tag. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_SendChannelMessage(DCC_Channel:channel, const message[], const callback[] = "", const format[] = "", {Float, _}:...);
, wherechannel
is the internal id for the channel where the message must be sent,message
is a string containing the given message,callback
(optional) is a public function to be called when the message is confirmed as sent,format
(optional) is a format specifier which allows to provide the forementioned function with parameters, and{Float, _}:...
represents the space for said parameters to be given. - Returns: (?)