Skip to content

Commit 2118a83

Browse files
committed
Update | Stable 1.1
1 parent 262b90d commit 2118a83

File tree

5 files changed

+98
-27
lines changed

5 files changed

+98
-27
lines changed

composer.json

+1-2
Original file line numberDiff line numberDiff line change
@@ -21,8 +21,7 @@
2121
],
2222
"autoload": {
2323
"psr-4": {
24-
"Ourted\\": "src/",
25-
"Atlas\\": "Atlas/src/"
24+
"Ourted\\": "src/"
2625
}
2726
}
2827
}

composer.lock

+80-23
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

example/Ourted.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ public function setBot()
8989
}
9090
}
9191

92-
class EventListener extends \Ourted\Model\EventListener\EventListener
92+
class EventListener extends \Ourted\Model\EventListener
9393
{
9494

9595
# Guild

src/Interfaces/Guild.php

+15-1
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,7 @@ public function deleteRole($guild, $role_id)
148148
* @param string
149149
* @param int
150150
* @param string
151+
* @param array
151152
* @param int
152153
* @param int
153154
* @param int
@@ -156,12 +157,25 @@ public function deleteRole($guild, $role_id)
156157
* @param bool
157158
* @return \Ourted\Model\Channel\Channel
158159
*/
159-
public function createChannel($guild, $channel_name, $type = 0, $topic = "", $bitrate = null, $user_limit = null, $rate_limit_per_user = null, $position = null, $parent_id = null)
160+
public function createChannel($guild, $channel_name, $type = 0, $topic = "", $permissions = null, $bitrate = null, $user_limit = null, $rate_limit_per_user = null, $position = null, $parent_id = null)
160161
{
161162
$field = "";
162163
$field .= "\"name\": \"$channel_name\"";
163164
$field .= ",\"type\": $type";
164165
$field .= ",\"topic\": \"{$topic}\"";
166+
if (!is_null($permissions)) {
167+
if (isset($permissions[0])) {
168+
$__permissions = '';
169+
foreach ($permissions as $key => $item) {
170+
if ($key == 0) {
171+
$__permissions .= "{$item}";
172+
} else {
173+
$__permissions .= ",{$item}";
174+
}
175+
}
176+
$field .= ",\"permissions\": [{$__permissions}]";
177+
}
178+
}
165179
if (!is_null($bitrate)) {
166180
if ($type == $this->bot->GUILD_VOICE) {
167181
$field .= ",\"bitrate\":{$bitrate} ";

src/Model/Channel/Overwrite.php

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<?php

0 commit comments

Comments
 (0)