diff --git a/.idea/php.xml b/.idea/php.xml index 479ccac..8188805 100644 --- a/.idea/php.xml +++ b/.idea/php.xml @@ -6,11 +6,13 @@ - + + + @@ -88,7 +90,7 @@ - + \ No newline at end of file diff --git a/Makefile b/Makefile index 4fcc687..92a00ba 100644 --- a/Makefile +++ b/Makefile @@ -13,12 +13,12 @@ build: install: # Installs the compiled package to the system - ppm --fix-conflict --no-prompt --install="build/net.intellivoid.synical_bot.ppm" --branch="production" + ppm --fix-conflict --no-prompt --install="build/net.intellivoid.synical_bot.ppm" --branch="master" install_fast: # Installs the compiled package to the system - ppm --fix-conflict --no-prompt --skip-dependencies --install="build/net.intellivoid.synical_bot.ppm" --branch="production" + ppm --fix-conflict --no-prompt --skip-dependencies --install="build/net.intellivoid.synical_bot.ppm" --branch="master" run: # Runs the bot - ppm --main="net.intellivoid.synical_bot" --version="latest" \ No newline at end of file + ppm --main="net.intellivoid.synical_bot" --version="latest" diff --git a/botsrc/AdminCommands/BanCommand.php b/botsrc/AdminCommands/BanCommand.php index 56a93d0..dcde296 100644 --- a/botsrc/AdminCommands/BanCommand.php +++ b/botsrc/AdminCommands/BanCommand.php @@ -82,7 +82,7 @@ return Request::emptyResponse(); } - $CallerPermissions = $ChatMemberCache->getAdministratorUser($this->getMessage()->getFrom()->getId()); + $CallerPermissions = $ChatMemberCache->getAdministratorUser($this->getMessage()->getFrom()); if($CallerPermissions == null || $CallerPermissions->CanRestrictMembers == false) { return Request::sendMessage([ diff --git a/botsrc/AdminCommands/KickCommand.php b/botsrc/AdminCommands/KickCommand.php index 7624332..6a592fd 100644 --- a/botsrc/AdminCommands/KickCommand.php +++ b/botsrc/AdminCommands/KickCommand.php @@ -82,7 +82,7 @@ return Request::emptyResponse(); } - $CallerPermissions = $ChatMemberCache->getAdministratorUser($this->getMessage()->getFrom()->getId()); + $CallerPermissions = $ChatMemberCache->getAdministratorUser($this->getMessage()->getFrom()); if($CallerPermissions == null || $CallerPermissions->CanRestrictMembers == false) { return Request::sendMessage([ @@ -117,7 +117,7 @@ ]); } - $TargetPermissions = $ChatMemberCache->getAdministratorUser($TargetUser->User->ID); + $TargetPermissions = $ChatMemberCache->getAdministratorUser($TargetUser->User); if($TargetPermissions !== null) { if($TargetPermissions->IsOwner) diff --git a/botsrc/AdminCommands/UnbanCommand.php b/botsrc/AdminCommands/UnbanCommand.php index dc83995..d834c13 100644 --- a/botsrc/AdminCommands/UnbanCommand.php +++ b/botsrc/AdminCommands/UnbanCommand.php @@ -82,7 +82,7 @@ return Request::emptyResponse(); } - $CallerPermissions = $ChatMemberCache->getAdministratorUser($this->getMessage()->getFrom()->getId()); + $CallerPermissions = $ChatMemberCache->getAdministratorUser($this->getMessage()->getFrom()); if($CallerPermissions == null || $CallerPermissions->CanRestrictMembers == false) { return Request::sendMessage([ diff --git a/botsrc/package.json b/botsrc/package.json index 7f3b4ae..0ce5ffd 100644 --- a/botsrc/package.json +++ b/botsrc/package.json @@ -89,7 +89,11 @@ "components": [ { "required": true, - "file": "SynicalBot.php" + "file": "AdminCommands/AdminCacheCommand.php" + }, + { + "required": true, + "file": "AdminCommands/BanCommand.php" }, { "required": true, @@ -101,15 +105,11 @@ }, { "required": true, - "file": "AdminCommands/BanCommand.php" + "file": "commands/InfoCommand.php" }, { "required": true, - "file": "AdminCommands/AdminCacheCommand.php" - }, - { - "required": true, - "file": "SynicalBot/Utilities.php" + "file": "commands/StartCommand.php" }, { "required": true, @@ -117,17 +117,17 @@ }, { "required": true, - "file": "commands/InfoCommand.php" + "file": "SynicalBot/Utilities.php" }, { "required": true, - "file": "commands/StartCommand.php" + "file": "SynicalBot.php" } ], "files": [ - "package.json", - "worker", ".htaccess", - "main" + "main", + "package.json", + "worker" ] } \ No newline at end of file