From 0c16ecada52bf14dab0adfe4856acc3da78ae457 Mon Sep 17 00:00:00 2001 From: SeanOMik Date: Thu, 18 Jun 2020 18:10:21 -0500 Subject: [PATCH] Make some procs async --- src/permission.nim | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/permission.nim b/src/permission.nim index d00ab1d..f0b41d2 100644 --- a/src/permission.nim +++ b/src/permission.nim @@ -1,4 +1,4 @@ -import json, discordobject, nimcordutils +import json, discordobject, nimcordutils, asyncdispatch type PermissionType* = enum @@ -62,7 +62,7 @@ proc hasPermission*(perms: Permissions, perm: Permission): bool = ## This also checks if it is not a part of the denyPerms. return (perms.allowPerms and uint(perm)) == uint(perm) and (perms.denyPerms and uint(perm)) != uint(perm) -proc addAllowPermission*(perms: Permissions, perm: Permission): Permissions = +proc addAllowPermission*(perms: Permissions, perm: Permission): Future[Permissions] {.async.} = ## Add a `Permission` to the `Permissions` allow values. ## If it finds the permission in denyPerms, it will remove it from that also. @@ -72,7 +72,7 @@ proc addAllowPermission*(perms: Permissions, perm: Permission): Permissions = perms.allowPerms = perms.allowPerms or uint(perm) -proc addDenyPermission*(perms: Permissions, perm: Permission): Permissions = +proc addDenyPermission*(perms: Permissions, perm: Permission): Future[Permissions] {.async.} = ## Add a `Permission` to the `Permissions` deny values. ## If it finds the permission in allowPerms, it will remove it from that also.