mirror of
https://github.com/civsocit/olgram.git
synced 2023-07-22 01:29:12 +03:00
user info minor improvement
This commit is contained in:
parent
0d31679280
commit
883879e390
@ -70,6 +70,9 @@ async def send_user_message(message: types.Message, super_chat_id: int, bot):
|
||||
if message.from_user.username:
|
||||
user_info += " | @" + message.from_user.username
|
||||
user_info += f" | #{message.from_user.id}"
|
||||
if message.content_type == types.ContentType.TEXT: # Добавлять информацию в конец текста
|
||||
new_message = await message.bot.send_message(super_chat_id, message.text + "\n\n" + user_info)
|
||||
else: # Информационное сообщение + оригинальное сообщение
|
||||
new_message = await message.bot.send_message(super_chat_id, text=user_info)
|
||||
await _redis.set(_message_unique_id(bot.pk, new_message.message_id), message.chat.id,
|
||||
pexpire=ServerSettings.redis_timeout_ms())
|
||||
|
Loading…
Reference in New Issue
Block a user