Skip to content

Commit

Permalink
[business] Change to edit message .id
Browse files Browse the repository at this point in the history
  • Loading branch information
yehuda-lev committed Jun 28, 2024
1 parent 2933311 commit 20d3315
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
pyrotgfork==2.1.32.6
pyrotgfork==2.1.32.9
PyroTgCrypto==1.2.6a0
SQLAlchemy==2.0.30
pydantic-settings==2.3.1
8 changes: 3 additions & 5 deletions tg/get_ids.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import logging
from pyrogram import Client, types, enums, errors, raw, ContinuePropagation

from tg import filters, strings, payments
from tg import filters, strings
from db import repository


Expand Down Expand Up @@ -688,11 +688,9 @@ async def get_id_with_business_connection(client: Client, msg: types.Message):

text = await get_id_by_reply(msg)

# send the id of the chat without the notification
await msg.reply(
disable_notification=True,
# edit the message with the id
await msg.edit(
text=text,
quote=True,
reply_markup=await get_reply_markup(client),
)

Expand Down
3 changes: 1 addition & 2 deletions tg/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,8 +189,7 @@
),
handlers.MessageHandler(
payments.send_thanks_for_support,
filters.successful_payment
& tg_filters.create_user(),
filters.successful_payment & tg_filters.create_user(),
),
# admin command
handlers.MessageHandler(
Expand Down
9 changes: 4 additions & 5 deletions tg/strings.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,13 +220,12 @@
"he": "תמכו בי 🙏",
},
"TEXT_SUPPORT_ME": {
"en": "Support me with {} XTR ⭐️",
"he": "תמכו בי ב-{} XTR ⭐️",
"en": "Support me with {} ⭐️",
"he": "תמכו בי ב-{} ⭐️",
},
"PAYMENT_SUCCESS": {
"en": "🎉 Thank you for your donation 🎉\n"
"I received your donation of {} XTR ⭐️",
"he": "🎉 תודה על התרומה שלך 🎉\n" "קיבלתי את התרומה שלך של {} XTR ⭐️",
"en": "🎉 Thank you for your donation 🎉\n" "I received your donation of {} ⭐️",
"he": "🎉 תודה על התרומה שלך 🎉\n" "קיבלתי את התרומה שלך של {} ⭐️",
},
}

Expand Down

0 comments on commit 20d3315

Please sign in to comment.