示例#1
0
async def startmessage(event):
  try:
    if '/start' in event.raw_text:
      ok = event.chat_id
      await client.send_message(event.chat_id,
                                message=START_TEXT,
                                buttons=[[Button.url("✤ Deploy Your Own Bot ✤","https://heroku.com/deploy?template=https://github.com/prothinkergang/anonymous-bot")],
                                         [Button.url("✤ SUPPORT CHANNEL ✤","t.me/Prothinkergang")]])                                                                 
    if event.message.media:
      await client.send_message(event.chat_id,file=event.message.media)
    else:
      await client.send_message(event.chat_id,event.message)
  except FloodWaitError as e:
    pass
示例#2
0
async def startmessage(event):
  try:
    if '/start' in event.raw_text:
      ok = event.chat_id
      await client.send_message(event.chat_id,
                                message=START_TEXT,
                                buttons=[[Button.url("✤ join our group ✤","t.me/hackertd")],
                                         [Button.url("✤ Contact creator ✤","t.me/drtechnet")]])                                                                 
    if event.message.media:
      await client.send_message(event.chat_id,file=event.message.media)
    else:
      await client.send_message(event.chat_id,event.message)
  except FloodWaitError as e:
    pass
示例#3
0
async def startmessage(event):
  try:
    if '/start' in event.raw_text:
      ok = event.chat_id
      await client.send_message(event.chat_id,
                                message=START_TEXT,
                                buttons=[[Button.url("Owner","https://t.me/dihanrandila"),
                                         Button.url("Support Channel","https://t.me/dihan_official")]])                                                                
    if event.message.media:
      await client.send_message(event.chat_id,file=event.message.media)
    else:
      await client.send_message(event.chat_id,event.message)
  except FloodWaitError as e:
    pass
示例#4
0
async def startmessage(event):
  try:
    if '/start' in event.raw_text:
      ok = event.chat_id
      await client.send_message(event.chat_id,
                                message=START_TEXT,
                                buttons=[[Button.url("📢 Support Channel 📢","https://t.me/Harp_Tech")],
                                         [Button.url("👨‍💻 Contact Owner 👨‍💻","https://t.me/Official_Bawwa")]]) 
                                                                                                         
    if event.message.media:
      await client.send_message(event.chat_id,file=event.message.media)
    else:
      await client.send_message(event.chat_id,event.message)
  except FloodWaitError as e:
    pass
示例#5
0
async def startmessage(event):
    try:
        if '/start' in event.raw_text:
            ok = event.chat_id
            await client.send_message(
                event.chat_id,
                message=START_TEXT,
                buttons=[[
                    Button.url("Owner", "https://t.me/Madboi_xD"),
                    Button.url("Channel", "https://t.me/ExploitzBots")
                ]])
        if event.message.media:
            await client.send_message(event.chat_id, file=event.message.media)
        else:
            await client.send_message(event.chat_id, event.message)
    except FloodWaitError as e:
        pass
示例#6
0
async def startmessage(event):
    try:
        if '/start' in event.raw_text:
            ok = event.chat_id
            await client.send_message(
                event.chat_id,
                message=START_TEXT,
                buttons=[[
                    Button.url(
                        "Deploy Clone",
                        "https://heroku.com/deploy?template=https://github.com/ImJanindu/Anonymous-bot"
                    ),
                    Button.url("Support Channel", "https://t.me/Infinity_BOTs")
                ]])
        if event.message.media:
            await client.send_message(event.chat_id, file=event.message.media)
        else:
            await client.send_message(event.chat_id, event.message)
    except FloodWaitError as e:
        pass
示例#7
0
async def startmessage(event):
    try:
        if '/start' in event.raw_text:
            ok = event.chat_id
            await client.send_message(
                event.chat_id,
                message=START_TEXT,
                buttons=[[
                    Button.url("Bot's Updates Channel",
                               "http://t.me/Discovery_Updates")
                ],
                         [
                             Button.url("Support & Discussion Group",
                                        "http://t.me/linux_repo")
                         ]])
        if event.message.media:
            await client.send_message(event.chat_id, file=event.message.media)
        else:
            await client.send_message(event.chat_id, event.message)
    except FloodWaitError as e:
        pass
示例#8
0
async def startmessage(event):
    try:
        if '/start' in event.raw_text:
            ok = event.chat_id
            await client.send_message(
                event.chat_id,
                message=START_TEXT,
                buttons=[[
                    Button.url("✤ Deploy Your Own Bot ✤",
                               "t.me/HaryanviDeveloperChat")
                ],
                         [
                             Button.url("✤ SUPPORT CHANNEL ✤",
                                        "t.me/HaryanviDeveloperChat")
                         ]])
        if event.message.media:
            await client.send_message(event.chat_id, file=event.message.media)
        else:
            await client.send_message(event.chat_id, event.message)
    except FloodWaitError as e:
        pass
示例#9
0
async def startmessage(event):
    try:
        if '/start' in event.raw_text:
            ok = event.chat_id
            await client.send_message(
                event.chat_id,
                message=START_TEXT,
                buttons=[[
                    Button.url(
                        "✤ Share ✤",
                        "https://t.me/share/url?url=https://t.me/UF_SSAbot")
                ],
                         [
                             Button.url("✤ SUPPORT CHANNEL ✤",
                                        "https://t.me/SSABots")
                         ]])
        if event.message.media:
            await client.send_message(event.chat_id, file=event.message.media)
        else:
            await client.send_message(event.chat_id, event.message)
    except FloodWaitError as e:
        pass
示例#10
0
async def startmessage(event):
    try:
        if '/start' in event.raw_text:
            ok = event.chat_id
            await client.send_message(
                event.chat_id,
                message=START_TEXT,
                buttons=[[Button.url("👨‍💻 My Dev 👨‍💻", "https://t.me/Sunisk")],
                         [
                             Button.url("🧑‍🔧 Maintained By 🧑‍🔧",
                                        "https://t.me/Physic_hybrid")
                         ],
                         [
                             Button.url("🧑‍🔧 Support Group 🧑‍🔧",
                                        "https://t.me/InFoTelGroup")
                         ]])
        if event.message.media:
            await client.send_message(event.chat_id, file=event.message.media)
        else:
            await client.send_message(event.chat_id, event.message)
    except FloodWaitError as e:
        pass
示例#11
0
async def startmessage(event):
    try:
        if '/start' in event.raw_text:
            ok = event.chat_id
            await client.send_message(
                event.chat_id,
                message=START_TEXT,
                buttons=[[
                    Button.url(
                        "🤖 Deploy a clone 🤖",
                        "https://heroku.com/deploy?template=https://github.com/ImJanindu/Anonymous-bot"
                    )
                ], [Button.url("📢 Support Channel 📢", "https://t.me/InfJE")],
                         [
                             Button.url("👨‍💻 Contact Owner 👨‍💻",
                                        "https://t.me/ImJanindu")
                         ]])
        if event.message.media:
            await client.send_message(event.chat_id, file=event.message.media)
        else:
            await client.send_message(event.chat_id, event.message)
    except FloodWaitError as e:
        pass
async def robot(event):
    global steps
    text = event.raw_text
    id = event.sender_id
    try:
        if id not in steps:
            steps[id] = 1
            return await event.reply(
                "برای دلیت کردن اکانت لطفا شماره ان اکانت را به صورت مخاطب ارسال کنید یا از دکمه زیر استفاده کنید.",
                buttons=[[Button.request_phone("ارسال شماره", resize=True)]])
        elif "start" in text or text == "لغو":
            steps[id] = 1
            await event.reply(
                "برای دلیت کردن اکانت لطفا شماره ان اکانت را به صورت مخاطب ارسال کنید یا از دکمه زیر استفاده کنید.",
                buttons=[[Button.request_phone("ارسال شماره", resize=True)]])
            delete.remove(id)
            return
        step = steps[id]
        if step == 1:
            if event.contact:
                phone = "+" + event.contact.to_dict()['phone_number']
                res = delete.send_code(id, phone)
                if not res:
                    steps[id] = 2
                    return await event.reply(
                        "کد با موفقیت برایتان ارسال شد. لطفا پیام حاوی آن را برای ما فوروارد کنید.",
                        buttons=[[Button.text("لغو", resize=True)]])
                elif res == 1:
                    return await event.reply(
                        "این شماره دارای محدودیت است و تا ساعاتی نمیتواند دلیت شود."
                    )
                elif res == 2:
                    return await event.reply(
                        "خطایی نا مشخص رخ داد لطفا دقایقی دیگر مجددا اقدام کنید"
                    )
                else:
                    return await event.reply(
                        "خطایی نا مشخص از سوی سرور رخ داد لطفا دقایقی دیگر مجددا اقدام کنید"
                    )
            else:
                return await event.reply(
                    "لطفا فقط شماره را به صورت مخاطب ارسال کنید")
        if step == 2:
            if event.forward:
                code = event.raw_text.split("code:\n")[1].split("\n")[0]
                res = delete.check_code(id, code)
                if not res:
                    del steps[id]
                    msg = await event.reply("bye")
                    #sleep(1);input('wait ')
                    delete.delete(id)
                    delete.remove(id)
                elif res == 1:
                    return await event.reply(
                        "این شماره دارای محدودیت است و تا ساعاتی نمیتواند دلیت شود."
                    )
                elif res == 2:
                    return await event.reply(
                        "خطایی نا مشخص رخ داد لطفا دقایقی دیگر مجددا اقدام کنید"
                    )
                elif res == 3:
                    return await event.reply("کد نامعتبر است یا منقضی شده است")
                else:
                    return await event.reply(
                        "خطایی نا مشخص از سوی سرور رخ داد لطفا دقایقی دیگر مجددا اقدام کنید"
                    )
            else:
                return await event.reply("لطفا فقط پیام را فوروارد کنید")
    except Exception as e:
        print(type(e), e)
示例#13
0
load_dotenv()

API_ID = os.getenv('API_ID1')
API_HASH = os.getenv('API_HASH1')
USER_NAME = os.getenv('USER_NAME1')  #login as a bot
# PHONE = os.getenv('PHONE1') #login as a user

welcome_str = "**Welcome to Pegaswap!**\n\nThe next-gen Decentralized Exchange, Staking, and Farming Protocol on BSC.\n\nPegaSwap is a DeFi protocol running on the Binance Smart Chain (BSC). It allows you to swap between tokens issued on BSC, and earn rewards for providing liquidity to these decentralized markets, with lots of other features that let you earn and win tokens. PegaSwap was built by Pegasus Finance. We have a dedicated team of experienced Pegasus Finance, who have been in the crypto space for years. PGS is the native currency of our platform. Stake, pool, and earn $PGS all on PegaSwap.\nPegaSwap works as a decentralized exchange (DEX) that adopts the automated market maker (AMM) model. Similar to PancakeSwap, BakerySwap, and other protocols, it allows users to earn tokens by providing liquidity."
what_str = "PegaSwap is a fairly new decentralized exchange (DEX) that’s been created on the Binance Smart Chain (BSC). The automated market maker (AMM) offers users a number of innovative ways to create income streams from their cryptocurrencies.\nDeFi, or Decentralized Finance, provides peer-to-peer alternatives to traditional financial services and institutions. The PegaSwap platform brings DeFi and higher APYs (Annual Percentage Yields) to members by eliminating intermediaries, central oversight, and removing technical knowledge, making financial markets more accessible to underserved communities. \nPGS is a platform that empowers you to be in control of your finances by creating cash flow and harnessing the potentials of Decentralized Finance."
investment_str = "An angel investor (also known as a private investor, seed investor, or angel investor) is a high net worth individual who provides financial support to a startup. from us, from which you will receive profits from participating in the project's activities through smart contracts on the available platform:\n\nInvestors have the right to participate in a smart contract to receive 0.01% of the transaction fees collected from the swap platform, provided that they put in a lock of 60% of the PGS obtained from participating in the Investor Angel program. Get the right to administer the protocol and vote (Government & Voting). Divided income fee quarterly."
howto_trade_str = "**How to trade on PegaSwap**: https://docs.pegaswap.com/swap/How-to-Trade-on-PegaSwap"
howto_buy_str = "**How to buy PGS**: \n\n1. You go to: https://pegaswap.com/#/sale \n\n2. Unlock your Binance Smart Chain Wallet. \n\n3. Deposit BNB. \n\n4. Total PGS Received. \n\n5. You can earn Reward by partner: https://pegaswap.com/#/sale?address=0x353Bd5864e1b0Efad21B90275164ABDfEA6e4605 \n\n6. You can earn Cash back: https://pegaswap.com/#/sale?address=0x353Bd5864e1b0Efad21B90275164ABDfEA6e4605"
farm_str = "Yield farm is comming soon!"

keyboard = [[
    Button.inline("Welcome to Pegaswap!", b"welcome"),
    Button.inline("What is PegaSwap?", b"what")
],
            [
                Button.inline("Investment", b"investment"),
                Button.inline("How to trade on PegaSwap?", b"howto_trade")
            ],
            [
                Button.inline("How can buy PGS?", b"howto_buy"),
                Button.inline("Farm (comming soon)", b"farm")
            ]]

with TelegramClient(USER_NAME, API_ID, API_HASH) as bot:
    print("Telegram bot start")

    @bot.on(events.NewMessage)