Closed bryanfranklyn closed 4 years ago
From your code above, I can't see any import of database.php
in your GenericmessageCommand.php
file.
You should be able to put it at the beginning of your execute()
method and it should work. Make sure that the file paths are correct. For best practice, use the absolute path when requiring/including files (e.g. require __DIR__ . '/../path/to/database.php';
)
@bryanfranklyn Did you manage to get this working? Can we close here?
I want to use my database with medoo framework (database framework) it is posible ?
i use genericmessagecomand with regex to find words that would be the keyword to query on my database(i use database framework) with function "caridata" and return $text this text will send to user of my bot.
but when i place require'database.php' on genericmessagecomend to call my function 'caridata' bot not working(no respon from bot for any comand i try) happy if anyone helps me
Here my genericmessagecommand.php
and here my database.php that contain the search function (caridata) and this database.php file require medoo framework (database framework)