Skip to content

Commit

Permalink
Update | Stable 1.1
Browse files Browse the repository at this point in the history
  • Loading branch information
gncdev committed Sep 18, 2020
1 parent 262b90d commit 2118a83
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 27 deletions.
3 changes: 1 addition & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@
],
"autoload": {
"psr-4": {
"Ourted\\": "src/",
"Atlas\\": "Atlas/src/"
"Ourted\\": "src/"
}
}
}
103 changes: 80 additions & 23 deletions composer.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion example/Ourted.php
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ public function setBot()
}
}

class EventListener extends \Ourted\Model\EventListener\EventListener
class EventListener extends \Ourted\Model\EventListener
{

# Guild
Expand Down
16 changes: 15 additions & 1 deletion src/Interfaces/Guild.php
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ public function deleteRole($guild, $role_id)
* @param string
* @param int
* @param string
* @param array
* @param int
* @param int
* @param int
Expand All @@ -156,12 +157,25 @@ public function deleteRole($guild, $role_id)
* @param bool
* @return \Ourted\Model\Channel\Channel
*/
public function createChannel($guild, $channel_name, $type = 0, $topic = "", $bitrate = null, $user_limit = null, $rate_limit_per_user = null, $position = null, $parent_id = null)
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)
{
$field = "";
$field .= "\"name\": \"$channel_name\"";
$field .= ",\"type\": $type";
$field .= ",\"topic\": \"{$topic}\"";
if (!is_null($permissions)) {
if (isset($permissions[0])) {
$__permissions = '';
foreach ($permissions as $key => $item) {
if ($key == 0) {
$__permissions .= "{$item}";
} else {
$__permissions .= ",{$item}";
}
}
$field .= ",\"permissions\": [{$__permissions}]";
}
}
if (!is_null($bitrate)) {
if ($type == $this->bot->GUILD_VOICE) {
$field .= ",\"bitrate\":{$bitrate} ";
Expand Down
1 change: 1 addition & 0 deletions src/Model/Channel/Overwrite.php
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
<?php

0 comments on commit 2118a83

Please sign in to comment.