mirror of
https://github.com/spacebarchat/server.git
synced 2026-04-14 22:25:40 +00:00
Updated Permission (markdown)
@@ -9,6 +9,8 @@ getPermission(user_id: string, guild_id: string, channel_id?: string): Promise<P
|
||||
### Example
|
||||
```ts
|
||||
const perms = await getPermission(req.userid, guild_id);
|
||||
perms.hasThrow("MANAGE_GUILD") // will throw an error if the users lacks the permission
|
||||
|
||||
if (perms.has("MANAGE_GUILD")) {
|
||||
...
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user