1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
|
%global _empty_manifest_terminate_build 0
Name: python-ringcentral-bot-framework
Version: 0.7.2
Release: 1
Summary: RingCentral Chatbot Framework for Python
License: MIT License
URL: https://github.com/ringcentral/ringcentral-chatbot-python
Source0: https://mirrors.aliyun.com/pypi/web/packages/27/7a/f76c82f2077863e35f042171276b611501850fac0e253553d3c878259171/ringcentral_bot_framework-0.7.2.tar.gz
BuildArch: noarch
Requires: python3-ringcentral-client
Requires: python3-pydash
%description
# [RingCentral chatbot framework for Python](https://github.com/ringcentral/ringcentral-chatbot-python) <!-- omit in toc -->
[](https://travis-ci.org/ringcentral/ringcentral-chatbot-python)
Welcome to the RingCentral Chatbot Framework for Python. This framework dramatically simplifies the process of building a bot to work with Glip, RingCentral's group chat system. It is intended to do most of the heavy lifting for developers, allowing them to focus primarily on the logic and user experience of their bot.
## Features
- **Token Management** - handles the server logic associated with bot authentication, and auth token persistence
- **Event Subscribtion** - automatically subscribes to bot events, and renews those subscriptions when they expire
- **Easy Customization** - modify bot behaviors by editing `bot.py`
- **Data Persistence** - built-in suport for filedb and AWS dynamodb, with fully customizable DB layer
- **Turn-key hosting** - built-in suport for AWS lambda to host your bot
## Getting Started
Let's get a local chatbot server up and running so that you can understand how the framework functions. Our first chatbot will be a simple parrot bot that will repeat things back to you. Before we get started, let's get your development environment setup with everything you need.
### Install Prerequisites
This framework requires Python3.6+ and Pip3.
First we install [virtualenv](https://virtualenv.pypa.io/en/latest/) which will create an isolated environment in which to install and run all the python libraries needed by this framework. Using virtualenv will ensure that the libraries installed for this project do not conflict or disrupt the other python projects you are working on.
```bash
# init project
bin/init
source venv/bin/activate
```
Next, we need to run [ngrok](https://ngrok.com/), a tool for routing web requests to a localhost. This is what will allow your local bot in development to receive webhooks from RingCentral. ngrok is a node app and is installed and start as follows:
```bash
./bin/proxy
```
After ngrok has started, it will display the URL when the ngrok proxy is operating. It will say something like:
```Forwarding https://xxxxx.ngrok.io -> localhost:9898```
Make note of this URL, as you will need it in the next step.
### Create Your Bot App
You will need to create your Bot App in RingCentral. Clicking the link, "Create Bot App" below will do this for you. Remember to select `messagging bot` bot and for `All RingCentral customers`, When you click it, you will to enter in the `OAuth Redirect URI ` for the bot. This will be the ngrok URL above, plus `/bot-oauth`. For example:
https://xxxxxx.ngrok.io/bot-oauth
[Create Bot App](https://developer.ringcentral.com/new-app?name=Sample+Bot+App&desc=A+sample+app+created+in+conjunction+with+the+python+bot+framework&public=true&type=ServerBot&carriers=7710,7310,3420&permissions=ReadAccounts,EditExtensions,SubscriptionWebhook,Glip&redirectUri=)
When you are finished creating your Bot Application, make note of the Client ID and Client Secret. We will use those values in the next step.
### Edit .env
A sample .env file can be found in `.env.sample`. Create a copy of this file:
```bash
cp .sample.env .env
```
Then look for the following variables, and set them accordingly:
- `RINGCENTRAL_BOT_SERVER`
- `RINGCENTRAL_BOT_CLIENT_ID`
- `RINGCENTRAL_BOT_CLIENT_SECRET`
### Install Bot Behaviors
This bot framework loads all bot behaviors from a file called `config.py`. Let's copy the parrot bot config to get started.
```bash
cp sample-bots/parrot.py ./bot.py
```
### Start the Server
```bash
# rcs is cli server module from ringcentral_chatbot_server
rcs bot.py
```
### Add Bot to Glip
When the server is up and running, you can add the bot to your sandbox Glip account. Navigate the dashboard for the app you created above. Select "Bot" from the left-hand sidebar menu. Save a preferred name for your bot, then click the "Add to Glip" button.
### Send a Test Message
After the bot is added, we can message with it. Login to our [sandbox Glip](https://glip.devtest.ringcentral.com). Then start a chat with the bot using the name you chose in the previous step.
You should now be in private chat session with the bot. It should greet you with a message similar to:
> Hello, I am a chatbot. Please reply "ParrotBot" if you want to talk to me.
Type `@ParrotBot Polly want a cracker?` and let's see what happens.
## Quick start: Init a bot project with one line script
Now you know how it works, you may try to init a bot project in one line script:
```bash
# make sure you have python3.6+ and pip3 installed
# use wget
wget -qO- https://raw.githubusercontent.com/ringcentral/ringcentral-chatbot-factory-py/master/bin/init.sh | bash
# or with curl
curl -o- https://raw.githubusercontent.com/ringcentral/ringcentral-chatbot-factory-py/master/bin/init.sh | bash
```
A video to show the process: [https://youtu.be/x5sTrj5xSN8](https://youtu.be/x5sTrj5xSN8)
## Example bot apps
The following bots were created using this framework, and should serves as guides as you develop your own original bot.
- [date-time-chatbot](https://github.com/zxdong262/ringcentral-date-time-chatbot): simple Glip chatbot that can tell time/date.
- [assistant-bot](https://github.com/zxdong262/ringcentral-assistant-bot): simple assistant Glip bot to show user/company information, this bot will show you how to access user data.
- [poll-bot](https://github.com/zxdong262/ringcentral-poll-bot): Glip poll bot, this bot will show you how to create/use custom database wrapper.
- [translate-bot](https://github.com/zxdong262/ringcentral-translate-bot): translate bot for glip.
- [welcome-bot](https://github.com/zxdong262/ringcentral-welcome-bot-py): Glip chatbot to welcome new team member.
- [at-all-bot](https://github.com/zxdong262/ringcentral-at-all-bot): Add AT all function to glip with this bot.
## Advanced Topics
### Adaptive cards support
Check [sample-bots/parrot-adaptive-card.py](sample-bots/parrot-adaptive-card.py) as an example,
- Use `bot.sendAdaptiveCard` to send AdaptiveCard
- Use `bot.updateAdaptiveCard` to update AdaptiveCard
### Interactive message
Since we support `adaptive cards`, we also support interactive messages when using adaptive cards actions, so bot can get interactive messages directly from user actions, you need goto app setting page in `developer.ringcentral.com`, enable `Interactive Messages`, and set `https://xxxxx.ngrok.io/interactive` as `Outbound Webhook URL`
Check [sample-bots/interactive.py](sample-bots/interactive.py) as an example, define your own `onInteractiveMessage` function to handle interative messages.
### Hidden commands
- Post message `@Bot __rename__ newName` to rename bot to `newName`
- Post message `@Bot __setAvatar__` and image attachment to set bot profile image.
### Use CLI tool to create a bot app
The [ringcentral-chatbot-factory-py](https://github.com/ringcentral/ringcentral-chatbot-factory-py) was created to help speed up the process of creating additional Glip bots. To use it, install it, then run the `rcf` command as shown below:
```bash
pip3 install ringcentral_chatbot_factory
rcf my-ringcentral-chat-bot
```
Then just answer the prompts. Then follow the directions in `my-ringcentral-chat-bot/README.md` to get up and running.

- [Deploy to AWS Lambda](docs/deploy-to-aws-lambda.md)
- [Use or write extensions](docs/extensions.md)
- [Direct Use](docs/use.md)
## Unit Test
```bash
bin/test
```
## Todos
Visit [https://github.com/zxdong262/ringcentral-chatbot-python/issues](https://github.com/zxdong262/ringcentral-chatbot-python/issues)
## Credits
The core bot framework logic is implanted from [ringcentral-ai-bot](https://github.com/ringcentral-tutorials/ringcentral-ai-bot) written by [@tylerlong](https://github.com/tylerlong)
## License
MIT
%package -n python3-ringcentral-bot-framework
Summary: RingCentral Chatbot Framework for Python
Provides: python-ringcentral-bot-framework
BuildRequires: python3-devel
BuildRequires: python3-setuptools
BuildRequires: python3-pip
%description -n python3-ringcentral-bot-framework
# [RingCentral chatbot framework for Python](https://github.com/ringcentral/ringcentral-chatbot-python) <!-- omit in toc -->
[](https://travis-ci.org/ringcentral/ringcentral-chatbot-python)
Welcome to the RingCentral Chatbot Framework for Python. This framework dramatically simplifies the process of building a bot to work with Glip, RingCentral's group chat system. It is intended to do most of the heavy lifting for developers, allowing them to focus primarily on the logic and user experience of their bot.
## Features
- **Token Management** - handles the server logic associated with bot authentication, and auth token persistence
- **Event Subscribtion** - automatically subscribes to bot events, and renews those subscriptions when they expire
- **Easy Customization** - modify bot behaviors by editing `bot.py`
- **Data Persistence** - built-in suport for filedb and AWS dynamodb, with fully customizable DB layer
- **Turn-key hosting** - built-in suport for AWS lambda to host your bot
## Getting Started
Let's get a local chatbot server up and running so that you can understand how the framework functions. Our first chatbot will be a simple parrot bot that will repeat things back to you. Before we get started, let's get your development environment setup with everything you need.
### Install Prerequisites
This framework requires Python3.6+ and Pip3.
First we install [virtualenv](https://virtualenv.pypa.io/en/latest/) which will create an isolated environment in which to install and run all the python libraries needed by this framework. Using virtualenv will ensure that the libraries installed for this project do not conflict or disrupt the other python projects you are working on.
```bash
# init project
bin/init
source venv/bin/activate
```
Next, we need to run [ngrok](https://ngrok.com/), a tool for routing web requests to a localhost. This is what will allow your local bot in development to receive webhooks from RingCentral. ngrok is a node app and is installed and start as follows:
```bash
./bin/proxy
```
After ngrok has started, it will display the URL when the ngrok proxy is operating. It will say something like:
```Forwarding https://xxxxx.ngrok.io -> localhost:9898```
Make note of this URL, as you will need it in the next step.
### Create Your Bot App
You will need to create your Bot App in RingCentral. Clicking the link, "Create Bot App" below will do this for you. Remember to select `messagging bot` bot and for `All RingCentral customers`, When you click it, you will to enter in the `OAuth Redirect URI ` for the bot. This will be the ngrok URL above, plus `/bot-oauth`. For example:
https://xxxxxx.ngrok.io/bot-oauth
[Create Bot App](https://developer.ringcentral.com/new-app?name=Sample+Bot+App&desc=A+sample+app+created+in+conjunction+with+the+python+bot+framework&public=true&type=ServerBot&carriers=7710,7310,3420&permissions=ReadAccounts,EditExtensions,SubscriptionWebhook,Glip&redirectUri=)
When you are finished creating your Bot Application, make note of the Client ID and Client Secret. We will use those values in the next step.
### Edit .env
A sample .env file can be found in `.env.sample`. Create a copy of this file:
```bash
cp .sample.env .env
```
Then look for the following variables, and set them accordingly:
- `RINGCENTRAL_BOT_SERVER`
- `RINGCENTRAL_BOT_CLIENT_ID`
- `RINGCENTRAL_BOT_CLIENT_SECRET`
### Install Bot Behaviors
This bot framework loads all bot behaviors from a file called `config.py`. Let's copy the parrot bot config to get started.
```bash
cp sample-bots/parrot.py ./bot.py
```
### Start the Server
```bash
# rcs is cli server module from ringcentral_chatbot_server
rcs bot.py
```
### Add Bot to Glip
When the server is up and running, you can add the bot to your sandbox Glip account. Navigate the dashboard for the app you created above. Select "Bot" from the left-hand sidebar menu. Save a preferred name for your bot, then click the "Add to Glip" button.
### Send a Test Message
After the bot is added, we can message with it. Login to our [sandbox Glip](https://glip.devtest.ringcentral.com). Then start a chat with the bot using the name you chose in the previous step.
You should now be in private chat session with the bot. It should greet you with a message similar to:
> Hello, I am a chatbot. Please reply "ParrotBot" if you want to talk to me.
Type `@ParrotBot Polly want a cracker?` and let's see what happens.
## Quick start: Init a bot project with one line script
Now you know how it works, you may try to init a bot project in one line script:
```bash
# make sure you have python3.6+ and pip3 installed
# use wget
wget -qO- https://raw.githubusercontent.com/ringcentral/ringcentral-chatbot-factory-py/master/bin/init.sh | bash
# or with curl
curl -o- https://raw.githubusercontent.com/ringcentral/ringcentral-chatbot-factory-py/master/bin/init.sh | bash
```
A video to show the process: [https://youtu.be/x5sTrj5xSN8](https://youtu.be/x5sTrj5xSN8)
## Example bot apps
The following bots were created using this framework, and should serves as guides as you develop your own original bot.
- [date-time-chatbot](https://github.com/zxdong262/ringcentral-date-time-chatbot): simple Glip chatbot that can tell time/date.
- [assistant-bot](https://github.com/zxdong262/ringcentral-assistant-bot): simple assistant Glip bot to show user/company information, this bot will show you how to access user data.
- [poll-bot](https://github.com/zxdong262/ringcentral-poll-bot): Glip poll bot, this bot will show you how to create/use custom database wrapper.
- [translate-bot](https://github.com/zxdong262/ringcentral-translate-bot): translate bot for glip.
- [welcome-bot](https://github.com/zxdong262/ringcentral-welcome-bot-py): Glip chatbot to welcome new team member.
- [at-all-bot](https://github.com/zxdong262/ringcentral-at-all-bot): Add AT all function to glip with this bot.
## Advanced Topics
### Adaptive cards support
Check [sample-bots/parrot-adaptive-card.py](sample-bots/parrot-adaptive-card.py) as an example,
- Use `bot.sendAdaptiveCard` to send AdaptiveCard
- Use `bot.updateAdaptiveCard` to update AdaptiveCard
### Interactive message
Since we support `adaptive cards`, we also support interactive messages when using adaptive cards actions, so bot can get interactive messages directly from user actions, you need goto app setting page in `developer.ringcentral.com`, enable `Interactive Messages`, and set `https://xxxxx.ngrok.io/interactive` as `Outbound Webhook URL`
Check [sample-bots/interactive.py](sample-bots/interactive.py) as an example, define your own `onInteractiveMessage` function to handle interative messages.
### Hidden commands
- Post message `@Bot __rename__ newName` to rename bot to `newName`
- Post message `@Bot __setAvatar__` and image attachment to set bot profile image.
### Use CLI tool to create a bot app
The [ringcentral-chatbot-factory-py](https://github.com/ringcentral/ringcentral-chatbot-factory-py) was created to help speed up the process of creating additional Glip bots. To use it, install it, then run the `rcf` command as shown below:
```bash
pip3 install ringcentral_chatbot_factory
rcf my-ringcentral-chat-bot
```
Then just answer the prompts. Then follow the directions in `my-ringcentral-chat-bot/README.md` to get up and running.

- [Deploy to AWS Lambda](docs/deploy-to-aws-lambda.md)
- [Use or write extensions](docs/extensions.md)
- [Direct Use](docs/use.md)
## Unit Test
```bash
bin/test
```
## Todos
Visit [https://github.com/zxdong262/ringcentral-chatbot-python/issues](https://github.com/zxdong262/ringcentral-chatbot-python/issues)
## Credits
The core bot framework logic is implanted from [ringcentral-ai-bot](https://github.com/ringcentral-tutorials/ringcentral-ai-bot) written by [@tylerlong](https://github.com/tylerlong)
## License
MIT
%package help
Summary: Development documents and examples for ringcentral-bot-framework
Provides: python3-ringcentral-bot-framework-doc
%description help
# [RingCentral chatbot framework for Python](https://github.com/ringcentral/ringcentral-chatbot-python) <!-- omit in toc -->
[](https://travis-ci.org/ringcentral/ringcentral-chatbot-python)
Welcome to the RingCentral Chatbot Framework for Python. This framework dramatically simplifies the process of building a bot to work with Glip, RingCentral's group chat system. It is intended to do most of the heavy lifting for developers, allowing them to focus primarily on the logic and user experience of their bot.
## Features
- **Token Management** - handles the server logic associated with bot authentication, and auth token persistence
- **Event Subscribtion** - automatically subscribes to bot events, and renews those subscriptions when they expire
- **Easy Customization** - modify bot behaviors by editing `bot.py`
- **Data Persistence** - built-in suport for filedb and AWS dynamodb, with fully customizable DB layer
- **Turn-key hosting** - built-in suport for AWS lambda to host your bot
## Getting Started
Let's get a local chatbot server up and running so that you can understand how the framework functions. Our first chatbot will be a simple parrot bot that will repeat things back to you. Before we get started, let's get your development environment setup with everything you need.
### Install Prerequisites
This framework requires Python3.6+ and Pip3.
First we install [virtualenv](https://virtualenv.pypa.io/en/latest/) which will create an isolated environment in which to install and run all the python libraries needed by this framework. Using virtualenv will ensure that the libraries installed for this project do not conflict or disrupt the other python projects you are working on.
```bash
# init project
bin/init
source venv/bin/activate
```
Next, we need to run [ngrok](https://ngrok.com/), a tool for routing web requests to a localhost. This is what will allow your local bot in development to receive webhooks from RingCentral. ngrok is a node app and is installed and start as follows:
```bash
./bin/proxy
```
After ngrok has started, it will display the URL when the ngrok proxy is operating. It will say something like:
```Forwarding https://xxxxx.ngrok.io -> localhost:9898```
Make note of this URL, as you will need it in the next step.
### Create Your Bot App
You will need to create your Bot App in RingCentral. Clicking the link, "Create Bot App" below will do this for you. Remember to select `messagging bot` bot and for `All RingCentral customers`, When you click it, you will to enter in the `OAuth Redirect URI ` for the bot. This will be the ngrok URL above, plus `/bot-oauth`. For example:
https://xxxxxx.ngrok.io/bot-oauth
[Create Bot App](https://developer.ringcentral.com/new-app?name=Sample+Bot+App&desc=A+sample+app+created+in+conjunction+with+the+python+bot+framework&public=true&type=ServerBot&carriers=7710,7310,3420&permissions=ReadAccounts,EditExtensions,SubscriptionWebhook,Glip&redirectUri=)
When you are finished creating your Bot Application, make note of the Client ID and Client Secret. We will use those values in the next step.
### Edit .env
A sample .env file can be found in `.env.sample`. Create a copy of this file:
```bash
cp .sample.env .env
```
Then look for the following variables, and set them accordingly:
- `RINGCENTRAL_BOT_SERVER`
- `RINGCENTRAL_BOT_CLIENT_ID`
- `RINGCENTRAL_BOT_CLIENT_SECRET`
### Install Bot Behaviors
This bot framework loads all bot behaviors from a file called `config.py`. Let's copy the parrot bot config to get started.
```bash
cp sample-bots/parrot.py ./bot.py
```
### Start the Server
```bash
# rcs is cli server module from ringcentral_chatbot_server
rcs bot.py
```
### Add Bot to Glip
When the server is up and running, you can add the bot to your sandbox Glip account. Navigate the dashboard for the app you created above. Select "Bot" from the left-hand sidebar menu. Save a preferred name for your bot, then click the "Add to Glip" button.
### Send a Test Message
After the bot is added, we can message with it. Login to our [sandbox Glip](https://glip.devtest.ringcentral.com). Then start a chat with the bot using the name you chose in the previous step.
You should now be in private chat session with the bot. It should greet you with a message similar to:
> Hello, I am a chatbot. Please reply "ParrotBot" if you want to talk to me.
Type `@ParrotBot Polly want a cracker?` and let's see what happens.
## Quick start: Init a bot project with one line script
Now you know how it works, you may try to init a bot project in one line script:
```bash
# make sure you have python3.6+ and pip3 installed
# use wget
wget -qO- https://raw.githubusercontent.com/ringcentral/ringcentral-chatbot-factory-py/master/bin/init.sh | bash
# or with curl
curl -o- https://raw.githubusercontent.com/ringcentral/ringcentral-chatbot-factory-py/master/bin/init.sh | bash
```
A video to show the process: [https://youtu.be/x5sTrj5xSN8](https://youtu.be/x5sTrj5xSN8)
## Example bot apps
The following bots were created using this framework, and should serves as guides as you develop your own original bot.
- [date-time-chatbot](https://github.com/zxdong262/ringcentral-date-time-chatbot): simple Glip chatbot that can tell time/date.
- [assistant-bot](https://github.com/zxdong262/ringcentral-assistant-bot): simple assistant Glip bot to show user/company information, this bot will show you how to access user data.
- [poll-bot](https://github.com/zxdong262/ringcentral-poll-bot): Glip poll bot, this bot will show you how to create/use custom database wrapper.
- [translate-bot](https://github.com/zxdong262/ringcentral-translate-bot): translate bot for glip.
- [welcome-bot](https://github.com/zxdong262/ringcentral-welcome-bot-py): Glip chatbot to welcome new team member.
- [at-all-bot](https://github.com/zxdong262/ringcentral-at-all-bot): Add AT all function to glip with this bot.
## Advanced Topics
### Adaptive cards support
Check [sample-bots/parrot-adaptive-card.py](sample-bots/parrot-adaptive-card.py) as an example,
- Use `bot.sendAdaptiveCard` to send AdaptiveCard
- Use `bot.updateAdaptiveCard` to update AdaptiveCard
### Interactive message
Since we support `adaptive cards`, we also support interactive messages when using adaptive cards actions, so bot can get interactive messages directly from user actions, you need goto app setting page in `developer.ringcentral.com`, enable `Interactive Messages`, and set `https://xxxxx.ngrok.io/interactive` as `Outbound Webhook URL`
Check [sample-bots/interactive.py](sample-bots/interactive.py) as an example, define your own `onInteractiveMessage` function to handle interative messages.
### Hidden commands
- Post message `@Bot __rename__ newName` to rename bot to `newName`
- Post message `@Bot __setAvatar__` and image attachment to set bot profile image.
### Use CLI tool to create a bot app
The [ringcentral-chatbot-factory-py](https://github.com/ringcentral/ringcentral-chatbot-factory-py) was created to help speed up the process of creating additional Glip bots. To use it, install it, then run the `rcf` command as shown below:
```bash
pip3 install ringcentral_chatbot_factory
rcf my-ringcentral-chat-bot
```
Then just answer the prompts. Then follow the directions in `my-ringcentral-chat-bot/README.md` to get up and running.

- [Deploy to AWS Lambda](docs/deploy-to-aws-lambda.md)
- [Use or write extensions](docs/extensions.md)
- [Direct Use](docs/use.md)
## Unit Test
```bash
bin/test
```
## Todos
Visit [https://github.com/zxdong262/ringcentral-chatbot-python/issues](https://github.com/zxdong262/ringcentral-chatbot-python/issues)
## Credits
The core bot framework logic is implanted from [ringcentral-ai-bot](https://github.com/ringcentral-tutorials/ringcentral-ai-bot) written by [@tylerlong](https://github.com/tylerlong)
## License
MIT
%prep
%autosetup -n ringcentral_bot_framework-0.7.2
%build
%py3_build
%install
%py3_install
install -d -m755 %{buildroot}/%{_pkgdocdir}
if [ -d doc ]; then cp -arf doc %{buildroot}/%{_pkgdocdir}; fi
if [ -d docs ]; then cp -arf docs %{buildroot}/%{_pkgdocdir}; fi
if [ -d example ]; then cp -arf example %{buildroot}/%{_pkgdocdir}; fi
if [ -d examples ]; then cp -arf examples %{buildroot}/%{_pkgdocdir}; fi
pushd %{buildroot}
if [ -d usr/lib ]; then
find usr/lib -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/lib64 ]; then
find usr/lib64 -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/bin ]; then
find usr/bin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
if [ -d usr/sbin ]; then
find usr/sbin -type f -printf "\"/%h/%f\"\n" >> filelist.lst
fi
touch doclist.lst
if [ -d usr/share/man ]; then
find usr/share/man -type f -printf "\"/%h/%f.gz\"\n" >> doclist.lst
fi
popd
mv %{buildroot}/filelist.lst .
mv %{buildroot}/doclist.lst .
%files -n python3-ringcentral-bot-framework -f filelist.lst
%dir %{python3_sitelib}/*
%files help -f doclist.lst
%{_docdir}/*
%changelog
* Thu Jun 08 2023 Python_Bot <Python_Bot@openeuler.org> - 0.7.2-1
- Package Spec generated
|