refac
This commit is contained in:
1 parent
251b80ebec
commit
aa51ce482c
1 file changed
+8
-6
@@ -888,13 +888,15 @@ async def get_event_emitter(request_info, update_db=True):
|
|||||||
)
|
)
|
||||||
|
|
||||||
elif event_type == 'embeds':
|
elif event_type == 'embeds':
|
||||||
message = await Chats.get_message_by_id_and_message_id(
|
event_payload = event_data.get('data', {})
|
||||||
request_info['chat_id'],
|
embeds = event_payload.get('embeds', [])
|
||||||
request_info['message_id'],
|
|
||||||
)
|
|
||||||
|
|
||||||
embeds = event_data.get('data', {}).get('embeds', [])
|
if not event_payload.get('replace', False):
|
||||||
embeds.extend(message.get('embeds', []))
|
message = await Chats.get_message_by_id_and_message_id(
|
||||||
|
request_info['chat_id'],
|
||||||
|
request_info['message_id'],
|
||||||
|
)
|
||||||
|
embeds.extend(message.get('embeds', []))
|
||||||
|
|
||||||
await Chats.upsert_message_to_chat_by_id_and_message_id(
|
await Chats.upsert_message_to_chat_by_id_and_message_id(
|
||||||
request_info['chat_id'],
|
request_info['chat_id'],
|
||||||
|
|||||||
Reference in new issue
Block a user