Userbot for recording voicechat and archive

I have a group in telegram for debates and lectures. I’m looking for a way to make userbot to join ongoing voicechat and record them when an admin ask it. And after finishing recording it send the file to our channel to archive the depates and lectures. (for legal stuff, one of the conditions for participating in voice conversations is to agree to the voice recording)

I tried with chatgpt :sweat_smile: i manged to make it respond to admins command (recording- stop recording) and sent a file to our channel with (ogg file + date and time)

The problem is i couldn’t make the code for the userbot to join the voicechat - chatgpt keep Looping mistakes with tgcall.

Is there way or a script or service that can help with this.