main: sync group members between two groups
This commit is contained in:
parent
89d2582bf7
commit
ce67012744
19
main.py
19
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())
|
||||
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())
|
||||
|
Loading…
Reference in New Issue
Block a user