mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
debug print
This commit is contained in:
parent
9723c70deb
commit
16e944707f
@ -243,13 +243,18 @@ async def edited_message_handler(message: types.Message, *args, **kwargs):
|
|||||||
|
|
||||||
async def receive_invite(message: types.Message):
|
async def receive_invite(message: types.Message):
|
||||||
bot = db_bot_instance.get()
|
bot = db_bot_instance.get()
|
||||||
|
print("RECEIVE INVITE")
|
||||||
for member in message.new_chat_members:
|
for member in message.new_chat_members:
|
||||||
|
print("MEMBER ", str(member))
|
||||||
if member.id == message.bot.id:
|
if member.id == message.bot.id:
|
||||||
|
print("MEMBER IS BOT")
|
||||||
chat, _ = await GroupChat.get_or_create(chat_id=message.chat.id,
|
chat, _ = await GroupChat.get_or_create(chat_id=message.chat.id,
|
||||||
defaults={"name": message.chat.full_name})
|
defaults={"name": message.chat.full_name})
|
||||||
chat.name = message.chat.full_name
|
chat.name = message.chat.full_name
|
||||||
|
print("SAVE CHAT ", _)
|
||||||
await chat.save()
|
await chat.save()
|
||||||
if chat not in await bot.group_chats.all():
|
if chat not in await bot.group_chats.all():
|
||||||
|
print("ADD CHAT")
|
||||||
await bot.group_chats.add(chat)
|
await bot.group_chats.add(chat)
|
||||||
await bot.save()
|
await bot.save()
|
||||||
break
|
break
|
||||||
|
Loading…
Reference in New Issue
Block a user