Go to Lark Open Platform, create a new Custom App, then go to Credentials && Basic Info tab, copy the appid and app secret.

Go to "Open Features" Tab, and add Robot Features.
Sign Up Aircode and create a new App.
- AppName: your favorite bot name
- Runtime: Node.js 16
- Deployment region: US
- Typescript: NO

4. Copy code in main.js, and paste in aircode's hello.js file.
Copy code from main.js
Then, go to aircode, remove all default code, and paste code from [main.js][main.js]
remove old, default code is required.

Add 3 new Environment in Environments tab in page right top.
APPID
: value is your larksuite appid(you paste in text editor before), start withcli_
SECRET
: value is your larksuite secret(you paste in text editor before)KEY
: value is your openai key,you can find it at OpenAI Platform, start withsk-

Install required package at Dependencies tab in page left bottom.
you need install two package @larksuiteoapi/node-sdk
for invoke larksuite api, axios
for invoke openai api.
If you done Code/Environments/requiredments pacakges, then you can click deploy to done your first deploy.

And you will get a invoke url, copy it into your text editor.

Return to your Larksuite OpenPlatform Page, switch to Permissions & Scopes Page, add 3 Scopes.
im:message
Read and send messages in private and group chatsim:message.group_at_msg
Read group chat messages mentioning the botim:message.p2p_msg
Read private messages sent to the bot

Then switch to Event Subscriptions Tab, and set aircode's invoke url as Request URL

After set Request URL, Add Event
im.message.receive_v1
Message received v2.0
Go to Version Management & Release Tab, and create a new version, and submit it to release.

