Changeset 2718547
- Timestamp:
- 05/05/2022 10:38:03 AM (4 years ago)
- File:
-
- 1 edited
-
bots-master/trunk/README.txt (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
bots-master/trunk/README.txt
r2718541 r2718547 69 69 == Code Usage == 70 70 71 use WebXID\BotsMaster\ChatBot; 72 use WebXID\BotsMaster\ChatBot\BotUser; 71 ` 72 use WebXID\BotsMaster\ChatBot; 73 use WebXID\BotsMaster\ChatBot\BotUser; 73 74 74 BotUser::find(['type_id' => ChatBot\BotUser::TYPE_CHAT]); // returns all Group Chats and Channels list75 BotUser::find(['type_id' => ChatBot\BotUser::TYPE_USER]); // returns all subscribers75 BotUser::find(['type_id' => ChatBot\BotUser::TYPE_CHAT]); // returns all Group Chats and Channels list 76 BotUser::find(['type_id' => ChatBot\BotUser::TYPE_USER]); // returns all subscribers 76 77 77 BotUser::all(); // returns all records78 BotUser::all(); // returns all records 78 79 79 // -------------------------80 // ------------------------- 80 81 81 $bot_user = BotUser::findOne(['type_id' => ChatBot\BotUser::TYPE_USER]);82 $bot_user = BotUser::findOne(['type_id' => ChatBot\BotUser::TYPE_USER]); 82 83 83 $bot_user 84 && ChatBot::factory($user) 85 ->sendMessage('<b>Hello</b> world!'); // will send the message, if the plugin installed correctly 84 $bot_user 85 && ChatBot::factory($user) 86 ->sendMessage('<b>Hello</b> world!'); // will send the message, if the plugin installed correctly 87 ` 86 88 87 89 Please, check the Doc https://core.telegram.org/bots/api#html-style to get allowed HTML tags
Note: See TracChangeset
for help on using the changeset viewer.