diff --git a/main.py b/main.py index a3983ec..7b10c29 100644 --- a/main.py +++ b/main.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 +import time import requests import json from result import Result, Ok, Err, is_err @@ -199,6 +200,20 @@ if __name__ == "__main__": #print(receive_messages) bot = LabCleaningBot(api, "group.bm5KT3NJUW5FdkpRNnR2ZGRFa01oOVZBeUYrVkdnd3NNTzFpNWdsR2pwUT0=") - print(bot.get_other_members()) - #asyncio.run(api.receive_test()) \ No newline at end of file + while True: + groupinfo = bot.api.get_group(bot.base_group) + + if is_err(groupinfo): + print(groupinfo.unwrap_err()) + continue + + groupinfo = groupinfo.unwrap() + + res = bot.api.update_group_members("group.TTlKelhpUW1sUVJSU2Z2NDJpdjVWcllMTW93MTBNN2tseEtGaFkzQ1VsZz0=", groupinfo.members) + + if is_err(res): + print(res.unwrap_err()) + continue + + print(res.unwrap())