$channelPermissionsFor
This function retrieves the permissions a specific user or role has within a given channel. It returns a comma-separated list of those permissions.
Usage
$channelPermissionsFor[userID/roleID]
$channelPermissionsFor[channelID;userID/roleID]
Arguments:
userID/roleID
: (Required) The ID of the user or role whose permissions you want to retrieve.channelID
: (Optional) The ID of the channel to check permissions in. If omitted, the current channel where the command is executed will be used.
Breakdown:
$channelPermissionsFor[userID/roleID]
: This will return the permissions of the specified user or role within the channel the command is being executed in.$channelPermissionsFor[channelID;userID/roleID]
: This allows you to specify a different channel to check permissions in using itschannelID
. This is useful for checking permissions in other channels without being directly in that channel.
Example
Here's an example demonstrating how to use $channelPermissionsFor
:
In this example, the command !!exec $channelPermissionsFor[$channelID;$authorID]
retrieves and displays the permissions of the command author ($authorID
) within the current channel ($channelID
). The bot then responds with a comma-separated list of the user's permissions in that channel.