async def save_welcome(event): if event.fwd_from: return msg = await event.get_reply_message() string = "".join(event.text.split(maxsplit=1)[1:]) msg_id = None if msg and msg.media and not string: if BOTLOG_CHATID: await bot.send_message( BOTLOG_CHATID, f"#WELCOME_NOTE\ \nCHAT ID: {event.chat_id}\ \nThe following message is saved as the welcome note for the {event.chat.title}, Don't delete this message !!", ) msg_o = await event.client.forward_messages( entity=BOTLOG_CHATID, messages=msg, from_peer=event.chat_id, silent=True ) msg_id = msg_o.id else: await edit_or_reply( event, "`↫ يتطلب حفظ الوسائط كجزء من ملاحظة الترحيب تعيين BOTLOG_CHATID ⪼`", ) return elif event.reply_to_msg_id and not string: rep_msg = await event.get_reply_message() string = rep_msg.text success = "𖠕 تـم حفـض ترحـيبك بنـجاح @jthon ↫" if add_welcome_setting(event.chat_id, 0, string, msg_id) is True: return await edit_or_reply(event, success.format("saved")) rm_welcome_setting(event.chat_id) if add_welcome_setting(event.chat_id, 0, string, msg_id) is True: return await edit_or_reply(event, success.format("updated")) await edit_or_reply("Error while setting welcome in this group")
async def save_welcome(event): msg = await event.get_reply_message() string = "".join(event.text.split(maxsplit=1)[1:]) msg_id = None if msg and msg.media and not string: if BOTLOG_CHATID: await bot.send_message( BOTLOG_CHATID, f"#WELCOME_NOTE\ \nCHAT ID: {event.chat_id}\ \nThe following message is saved as the welcome note for the {event.chat.title}, Dont delete this message !!", ) msg_o = await event.client.forward_messages( entity=BOTLOG_CHATID, messages=msg, from_peer=event.chat_id, silent=True) msg_id = msg_o.id else: await edit_or_reply( event, "`Saving media as part of the welcome note requires the BOTLOG_CHATID to be set.`", ) return elif event.reply_to_msg_id and not string: rep_msg = await event.get_reply_message() string = rep_msg.text success = "`Welcome note {} for this chat.`" if add_welcome_setting(event.chat_id, 0, string, msg_id) is True: return await edit_or_reply(event, success.format("saved")) rm_welcome_setting(event.chat_id) if add_welcome_setting(event.chat_id, 0, string, msg_id) is True: return await edit_or_reply(event, success.format("updated")) await edit_or_reply("Error while setting welcome in this group")
async def save_welcome(event): if event.fwd_from: return msg = await event.get_reply_message() string = "".join(event.text.split(maxsplit=1)[1:]) msg_id = None if msg and msg.media and not string: if BOTLOG_CHATID: await bot.send_message( BOTLOG_CHATID, f"#الترحيب\ \n ⪼ ايدي الدردشة: {event.chat_id}\ \n ⪼ يتم حفظ الرسالة التالية كملاحظة ترحيب لـ {event.chat.title}, لا تحذف هذه الرسالة !!", ) msg_o = await event.client.forward_messages( entity=BOTLOG_CHATID, messages=msg, from_peer=event.chat_id, silent=True ) msg_id = msg_o.id else: await edit_or_reply( event, "**يتطلب حفظ الوسائط كجزء من الملاحظة الترحيبية تعيين BOTLOG_CHATID.**", ) return elif event.reply_to_msg_id and not string: rep_msg = await event.get_reply_message() string = rep_msg.text success = "** ⪼ تم {} التـرحيب في هذه الدردشـه 𓆰، **" if add_welcome_setting(event.chat_id, 0, string, msg_id) is True: return await edit_or_reply(event, success.format("حفـظ")) rm_welcome_setting(event.chat_id) if add_welcome_setting(event.chat_id, 0, string, msg_id) is True: return await edit_or_reply(event, success.format("تحـديث")) await edit_or_reply("خطأ أثناء تعيين الترحيب في هذه المجموعة")
async def _(event): if event.fwd_from: return cws = get_current_welcome_settings(event.chat_id) rm_welcome_setting(event.chat_id) await edit_or_reply(event ,"Welcome note cleared. " + \ "The previous welcome message was `{}`.".format(cws.custom_welcome_message))
async def _(event): if event.fwd_from: return cws = get_current_welcome_settings(event.chat_id) rm_welcome_setting(event.chat_id) await edit_or_reply(event, " Hoşgeldin mesajı silindi. " + "En son belirlenen hoşgeldin mesajı : `{}`.".format(cws.custom_welcome_message))
async def _(event): if event.fwd_from: return cws = get_current_welcome_settings(event.chat_id) rm_welcome_setting(event.chat_id) await event.edit( "**⌔︙تم حذف ترحيب بنجاح ✅**" + \ "**⌔︙رساله الترحيب السابقه هيه ↪️** `{}`.".format(cws.custom_welcome_message) )
async def _(event): if event.fwd_from: return cws = get_current_welcome_settings(event.chat_id) rm_welcome_setting(event.chat_id) await event.edit( "🗑️Messaggio di benvenuto, cancellato. " + \ "Il vecchio messaggio di benvenuto era `{}`.".format(cws.custom_welcome_message) )
async def _(event): if event.fwd_from: return cws = get_current_welcome_settings(event.chat_id) rm_welcome_setting(event.chat_id) await event.edit( "تم محو ملاحظة الترحيب. " + \ "كانت رسالة الترحيب السابقة `{}`.".format(cws.custom_welcome_message) )
async def _(event): if event.fwd_from: return cws = get_current_welcome_settings(event.chat_id) rm_welcome_setting(event.chat_id) await event.edit( "-@iqthon تم حذف ترحيب. " + \ "رساله الترحيب السابقه هيه `{}`.".format(cws.custom_welcome_message) )
async def _(event): if event.fwd_from: return cws = get_current_welcome_settings(event.chat_id) rm_welcome_setting(event.chat_id) await event.edit( "- 𖢞 Welcome cleared - @TeleOniOn. " + \ "The previous welcome message was `{}`.".format(cws.custom_welcome_message) )
async def _(event): if event.fwd_from: return cws = get_current_welcome_settings(event.chat_id) rm_welcome_setting(event.chat_id) await event.edit( "Welcome eliminato. " + \ "The previous welcome message was `{}`.".format(cws.custom_welcome_message) )
async def del_welcome(event): if event.fwd_from: return if rm_welcome_setting(event.chat_id) is True: await edit_or_reply(event, "`Welcome note deleted for this chat.`") else: await edit_or_reply(event, "`Do I have a welcome note here ?`")
async def del_welcome(event): if event.fwd_from: return if rm_welcome_setting(event.chat_id) is True: await edit_or_reply(event, "**تم مسح الترحيب بنجاح ✅**") else: await edit_or_reply(event, "**لا يوجد ترحيب مضاف هنا**")
async def del_welcome(event): if event.fwd_from: return if rm_welcome_setting(event.chat_id) is True: await edit_or_reply(event, "𖠕 تـم مـسح ترحـيبك بنـجاح ↫`") else: await edit_or_reply(event, "𖠕 لايـوجد لديـك هـنا تـرحيب ↫")
async def del_welcome(event): if event.fwd_from: return if rm_welcome_setting(event.chat_id) is True: await edit_or_reply(event, "**تــم حــذف الترحــيب**") else: await edit_or_reply(event, "**ليس هناك اي ترحــيب فـي الـدردشــة**")
async def del_welcome(event): if event.fwd_from: return if rm_welcome_setting(event.chat_id) is True: await edit_or_reply( event, "`Catatan selamat datang dihapus untuk obrolan ini.`" ) else: await edit_or_reply(event, "`Apakah saya punya pesan selamat datang di sini ?`")
async def del_welcome(event): if event.fwd_from: return if rm_welcome_setting(event.chat_id) is True: await edit_or_reply( event, "** ⪼ تم حـذف الترحيب في هـذه الدردشـه 𓆰،**", ) else: await edit_or_reply( event, "** ⪼ ليس هناك اي ترحــيب فـي الـدردشــة 𓆰،**", )