Natives (Users)
Vince Vandormael edited this page Apr 17, 2021
·
2 revisions
-
"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.
-
A user's "discriminator" are the extra 4 numbers added to a Discord username.
-
It is important for dest strings to be of DCC_ID_SIZE size.
- Usage:
DCC_FindUserByName(const user_name[], const user_discriminator[])
, whereuser_name
is the name of the user, and user_discriminator, their discriminator. - Returns: Internal ID of the specified user, with
DCC_User
tag.
- Usage:
DCC_FindUserById(const user_id[])
, whereuser_id
is the Discord ID of the user. - Returns: Internal ID of the specified user, with
DCC_User
tag.
- Usage:
DCC_GetUserId(DCC_User:user, dest[DCC_ID_SIZE], max_size = DCC_ID_SIZE)
, whereuser
is the internal id for the given user,dest
is an array 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_GetUserName(DCC_User:user, dest[DCC_USERNAME_SIZE], max_size = sizeof dest)
, whereuser
is the internal id for the given user,dest
is an array where the Discord username will be stored, andmax_size
is the size of the given string. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_GetUserDiscriminator(DCC_User:user, dest[], max_size = DCC_ID_SIZE)
, whereuser
is the internal id for the given user,dest
is an array where the Discord discriminator 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_IsUserBot(DCC_User:user, &bool:is_bot)
, whereuser
is the internal id for the given user, andis_bot
is a boolean which will indicate wether the given user is a bot or not. - Returns: (?) Relevant data is stored in the given parameter.
- Usage:
DCC_IsUserBot(DCC_User:user, &bool:is_verified)
, whereuser
is the internal id for the given user, andis_verified
is a boolean which will indicate wether the given user is verified or not. - Returns: (?) Relevant data is stored in the given parameter.