ncovercash / SimpleDiscord

A _simple_ PHP implementation of the Discord API
Apache License 2.0
2 stars 1 forks source link

BetterClient missing SprintB #2

Open bitnykk opened 3 years ago

bitnykk commented 3 years ago

Hello,

I'm the maintainer of a PHP game chatbot named Bebot (forum @ bebot.shadow-realm.org) and i'm considering SimpleDiscord as an API source candidate for a Discord module i'm planning soon.

But my issue is that DiscordSocket/BetterClient.php is crashing over line 82 : $payload_length = bindec(self::sprintB($data)); Seems the sprintB() method doesn't exist & i couldn't figure out that it's supposed to do in order to code it myself. Would it be a method to turn 64bit unsigned integer into binary then turned to hexa ? Sounds twisted ...

PHP Fatal error: Uncaught Error: Call to undefined method SimpleDiscord\DiscordSocket\BetterClient::sprintB() in Sources\Sim pleDiscord\src\DiscordSocket\BetterClient.php:83

Please help me fix this if possible :)