/auth
Search
K
Comment on page

getRoleRestrictedData( )

SlashAuth allows developers to store simple key-value pairs and restrict access to specific roles. This function fetches that data tied to a role.

Usage

const { data } = await client.app.getRoleRestrictedData({
role: 'Member'
});
console.log(data)

Return Value

{
data?: {
[ key: string ]: any;
};
error: ErrorMessage | null;
headers: Object;
statusCode: number;
}

Configuration

role

String that represents a role.
const { data } = await client.app.getRoleRestrictedData({
role: 'Member'
});
console.log(data)