diff --git a/.github/workflows/manual.yml b/.github/workflows/manual.yml new file mode 100644 index 0000000..11b2e35 --- /dev/null +++ b/.github/workflows/manual.yml @@ -0,0 +1,32 @@ +# This is a basic workflow that is manually triggered + +name: Manual workflow + +# Controls when the action will run. Workflow runs when manually triggered using the UI +# or API. +on: + workflow_dispatch: + # Inputs the workflow accepts. + inputs: + name: + # Friendly description to be shown in the UI instead of 'name' + description: 'Person to greet' + # Default value if no value is explicitly provided + default: 'World' + # Input has to be provided for the workflow to run + required: true + # The data type of the input + type: string + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "greet" + greet: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Runs a single command using the runners shell + - name: Send greeting + run: echo "Hello ${{ inputs.name }}" diff --git a/.github/workflows/updater.yml b/.github/workflows/updater.yml index fdb94ba..40143a7 100644 --- a/.github/workflows/updater.yml +++ b/.github/workflows/updater.yml @@ -1,4 +1,4 @@ -name: ⚡️ Update Status. ⚡️ +name: Update Status. ⚡️ on: schedule: diff --git a/main.py b/main.py index 9c9b9fa..70cdad7 100644 --- a/main.py +++ b/main.py @@ -25,7 +25,7 @@ LIST_BOTS = config("BOTS") CHANNEL_ID = config("CHANNEL_ID", cast=int) MESSAGE_ID = config("MESSAGE_ID", cast=int) - CHANNEL_NAME = config("CHANNEL_NAME", default="@BotzHub") + CHANNEL_NAME = config("CHANNEL_NAME", default="@zooistore") TIME_ZONE = config("TIME_ZONE", default="Asia/Kolkata") except BaseException as ex: log.info(ex) @@ -50,7 +50,7 @@ async def check_bots(): log.info("[CHECK] Started periodic checks...") channel_current_msg = await client.get_messages(CHANNEL_ID, ids=MESSAGE_ID) new_message = ( - "⚠️ **New periodic check in progress...** ⚠️\n\n" + channel_current_msg.text + "⚠️ **New check in progress...** ⚠️\n\n" + channel_current_msg.text ) try: await client.edit_message(CHANNEL_ID, MESSAGE_ID, new_message) @@ -80,7 +80,7 @@ async def check_bots(): # save stats in a dict bot_stats[bot] = { "response_time": None, - "status": "❌", + "status": "☠︎︎", } else: time_after_sending = time.time() @@ -89,12 +89,12 @@ async def check_bots(): # save stats in a dict. bot_stats[bot] = { "response_time": f"`{round(time_taken_for_response * 1000, 3)}ms`", # convert to ms for readability - "status": "✅", + "status": "✔︎", } except BaseException: bot_stats[bot] = { "response_time": "", - "status": "❌", + "status": "☠︎︎", } await client.send_read_acknowledge(bot) log.info(f"[CHECK] Checked @{bot} - {bot_stats[bot]['status']}.") @@ -134,10 +134,10 @@ async def check_bots(): # add last checked time current_time_utc = datetime.datetime.now(pytz.utc) current_time = current_time_utc.astimezone(pytz.timezone(TIME_ZONE)) - status_message += f"**Last checked at** `{current_time.strftime('%H:%M:%S - %d %B %Y')}` [ __{TIME_ZONE}__ ]" + status_message += f"➪ Lᴀsᴛ Cʜᴇᴄᴋᴇᴅ Aᴛ `{current_time.strftime('%H:%M:%S - %d %B %Y')}` [ __{TIME_ZONE}__ ]" # add auto check message - status_message += f"\n\n**This message will be updated every 2 hours.**" + status_message += f"\n\n𝖡𝗈𝗍 𝖶𝗂𝗅𝗅 𝖢𝗁𝖾𝖼𝗄𝖾𝖽 𝖤𝗏𝖾𝗋𝗒 2 𝖧𝗈𝗎𝗋𝗌♲︎︎︎" # edit the message in the channel try: