Methods
-
<static> checkAllPerms(uId, cId, gId, perm, cb)
-
Check that a user or channel or guild has permission for something. Checks overrides for each, and if the user does not have an override, the request is forwarded to toExport.checkPerm.
Parameters:
Name Type Argument Description uIdstring | number The Discord user ID to check. cIdstring | number The Discord channel ID to check. gIdstring | number The Discord guild ID to check. permstring <nullable>
The permission string to check against. Null to check for overrides only. cbPatreon~basicCB Callback with parameters for error and success values. Properties
Name Type Description data.statusboolean If the given IDs have permission. - Source:
-
<static> checkPerm(uId, perm, cb)
-
Check that a user has a specific permission. Permissions are defined in Patreon~patreonTierPermFile. This does not check overrides.
Parameters:
Name Type Description uIdstring | number The Discord user ID to check. permstring The permission string to check against. cbPatreon~basicCB Callback with parameters for error and success values. Properties
Name Type Description data.statusboolean If the user has permission. - Source:
-
<static> fetchCampaign(cb)
-
Fetch the campaign information for ourself.
Parameters:
Name Type Description cbPatreon~basicCB Callback with parameters for error and success values. - Source:
-
<static> getAllPerms(uId, cId, gId, cb)
-
Fetch all permissions for a given user, channel, or guild.
Parameters:
Name Type Description uIdstring | number The ID of the Discord user. cIdstring | number The Discord channel ID. gIdstring | number The Discord guild ID. cbPatreon~basicCB Callback once operation is complete. - Source:
-
<static> getLevelPerms(pledgeAmount, exclusive, cb)
-
Responds with all permissions available at the given pledge amount.
Parameters:
Name Type Description pledgeAmountnumber The amount in cents that the user has pledged. exclusiveboolean Only get the rewards received at the exact pledge amount. Does not show all tier rewards below the pledge amount. cbPatreon~basicCB Callback with parameters for error and success values. Properties
Name Type Description data.statusArray.<string> All of the permission strings. - Source:
-
<static> getSettingValue(uId, cId, gId, permString, cb)
-
Responds with the settings value for a user if they have permission for the setting, otherwise replies with the default value.
Parameters:
Name Type Description uIdnumber | string The user id to check, or null to get the default value. cIdnumber | string The Discord channel id to check, or null to get the default value. gIdnumber | string The Discord guild id to check, or null to get the default value. permStringstring The permission to check with subvalues separated by spaces. cbPatreon~basicCB Callback with parameters for error and success values. Properties
Name Type Description data.status* The setting's value. - Source: