Git Product home page Git Product logo

checkstatusuniv's Introduction

sᴛᴀᴛᴜs ᴄʜᴇᴄᴋᴇʀ

ᴀᴛʟᴇᴀsᴛ ɢɪᴠᴇ ᴀ sᴛᴀʀ ᴀɴᴅ ғᴏʀᴋ ᴛʜᴇ ʀᴇᴘᴏ

🗒️ ɴᴇᴄᴇssᴀʀʏ ᴠᴀʀs

  1. API_ID : Telegram API_ID, get it from my.telegram.org/apps
  2. API_HASH : Telegram API_ID, get it from my.telegram.org/apps
  3. STRING_SESSION : A valid Pyrogram session string, get it from @StringGenratorbot
  4. BOT_LIST : Your bot username list without '@' (Example: Atiya_Robot PyroHackRobot)
  5. CHANNEL_ID : Your channel's Telegram id (Example: -1001887171460)
  6. MESSAGE_ID : Telegram id of message from your channel or group (Example: 45)
  7. LOG_ID : Log id (Example: -1001565615923)
  8. TIME_ZONE: Your time zone (Example: Asia/Kolkata)

ɴᴏᴡ ᴄᴏᴘʏ ᴛʜᴇ ғᴏʟʟᴏᴡɪɴɢ ᴄᴏᴅᴇ ᴀɴᴅ ᴀᴅᴅ ɪɴᴛᴏ ʏᴏᴜʀ ʀᴇᴘᴏsɪᴛᴏʀʏ ɪɴ ᴘʟᴜɢɪɴs ᴅɪʀᴇᴄᴛᴏʀʏ :

import psutil
import time
from pyrogram import Client
from pyrogram import filters 
from pyrogram.types import Message

start_time = time.time()

def time_formatter(milliseconds):
    minutes, seconds = divmod(int(milliseconds / 1000), 60)
    hours, minutes = divmod(minutes, 60)
    days, hours = divmod(hours, 24)
    weeks, days = divmod(days, 7)
    tmp = (((str(weeks) + "ᴡ:") if weeks else "") +
           ((str(days) + "ᴅ:") if days else "") +
           ((str(hours) + "ʜ:") if hours else "") +
           ((str(minutes) + "ᴍ:") if minutes else "") +
           ((str(seconds) + "s") if seconds else ""))
    if not tmp:
        return "0s"
    if tmp.endswith(":"):
        return tmp[:-1]
    return tmp


@Client.on_message(filters.command("RocksStatusBot"))
async def activevc(_, message: Message):
    uptime = time_formatter((time.time() - start_time) * 1000)
    cpu = psutil.cpu_percent()
    TEXT = f"**ᴜᴘᴛɪᴍᴇ** : {uptime} | **ᴄᴘᴜ** : {cpu}%"
    await message.reply(TEXT)

━━━━━━━━━━━━━━━━━━━━

─「 ᴅᴇᴩʟᴏʏ ᴏɴ ʜᴇʀᴏᴋᴜ 」─

─「 ᴅᴇᴩʟᴏʏ ᴏɴ vps 」─

  1. Update and upgrade by :
sudo apt-get update && sudo apt-get upgrade -y
  1. Clone the repository by :
git clone https://github.com/ItzRocksKrishna/StatusChecker && cd StatusChecker
  1. Install requirements by :
pip3 install -U -r requirements.txt
  1. Create .env using sample.env by
cp sample.env .env
  1. Now open the .env file using vi .env
  2. Edit the vars, by pressing I on the keyboard
  3. After editing save the file using ctrl + c then :wq
  4. Finally run the script using python3 :
python3 main.py

━━━━━━━━━━━━━━━━━━━━

─「 sᴜᴩᴩᴏʀᴛ 」─

checkstatusuniv's People

Contributors

smartgirl15 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.