diff --git a/src/Toadling.php b/src/Toadling.php index fc8d921..e89330a 100644 --- a/src/Toadling.php +++ b/src/Toadling.php @@ -66,7 +66,7 @@ class Toadling }); $colorInt = intval(substr($color, 1), 16); if(null !== $colorRole) { - $roles = $colorRole->guild->roles; + $roles = $guild->roles; $rolesArray = $roles->toArray(); $rolesArray = array_map( function ($role) { @@ -87,8 +87,8 @@ class Toadling $guild->createRole([ 'name' => $color, 'color' => $colorInt, - ])->done(function (Role $colorRole) use ($message) { - $roles = $colorRole->guild->roles; + ])->done(function (Role $colorRole) use ($message, $guild) { + $roles = $guild->roles; $rolesArray = $roles->toArray(); $rolesArray = array_map( function ($role) {