Closed REDDE4D closed 8 years ago
The master branch uses the previous version of the api which isn't backwards compatible. We are currently working on a completely rewritten version of the geekbot which works on the new api and should be finalized soon.You might wanna check it out. https://github.com/runebaas/Geekbot/tree/2.0
Thanks. Looks fantastic so far. Is there a possibility to implement a db that catches user info like role, status(online/offline), last seen etc.?
Thanks :smile:
There is already a functionality which records when someone sent his or her last message, you can look it up by using the !stats @user
command discord itself
In the code itself you can look this up by using
Stats::getLastMessage($userID);
roles can be looked up by the following piece of code
$message->full_channel->guild->members->get('id', $message->author->id)->roles;
we are probably gonna add a function for the final release which makes this a lot easier, something like
$user = new \Geekbot\User($userID);
$roles = $user->getRoles();
The database handles everything separate for each server and user. Everything is stored in small JSON files in the /system/db folder (which will be created upon first launching the bot)
@runebaas Thanks for info. I'tried to start the Version 2.0 but i got the same error. Is it not runable yet?
Seems like our 2.0 release is also broken since the latest api update, we'll need to rewrite quiet some code to make it work again...
meanwhile you can downgrade to the previous api release by running this command and everything should work fine
composer require team-reflex/discord-php v3.2.3
Hmm.. idk if i did anything wrong but itstill wont work:
Fatal error: Uncaught exception 'GuzzleHttp\Exception\RequestException' with mes sage 'cURL error 60: SSL certificate problem: unable to get local issuer certifi cate (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)' in C:\xampp\htdocs \sn-clan\discord\vendor\guzzlehttp\guzzle\src\Handler\CurlFactory.php:187 Stack trace:
ory.php(150): GuzzleHttp\Handler\CurlFactory::createRejection(Object(GuzzleHttp\ Handler\EasyHandle), Array)
ory.php(103): GuzzleHttp\Handler\CurlFactory::finishError(Object(GuzzleHttp\Hand ler\CurlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handl er\CurlFactory))
ler.php(43): GuzzleHttp\Handler\CurlFactory::finish(Object(GuzzleHttp\Handler\Cu rlHandler), Object(GuzzleHttp\Handler\EasyHandle), Object(GuzzleHttp\Handler\Cur lFactory))
andler\CurlFactory.php on line 187
That is an error on your side... do you have the curl and openssl library enabled in your php.ini?
Yeah they are both enabled
well, this here might solve your problem http://stackoverflow.com/questions/35638497/curl-error-60-ssl-certificate-prblm-unable-to-get-local-issuer-certificate
so, the initial issue should be fixed now with these commits da85a5729f029f8f062293c86eef7c0e047510d7 e8e3a60fe86f42239e6990369f19e4652c08ab82
I followed your tutorial but whem i try to start the bot:
php bot.php Catchable fatal error: Argument 1 passed to Discord\Discord::__construct() must be of the type array, string given, called in C:\xampp\htdocs\discord\geekbot\bot.php on line 34 and defined in C:\xampp\htdocs\sn-clan\discord\geekbot\vendor\team-reflex\discord-php\src\Discord\Discord.php on line 289