Compare commits

..

No commits in common. "008cf08163e7f188b0de801a5432cd5bbd66c51c" and "7e3cf46765edb6ffde4005186777eac0185d7222" have entirely different histories.

2 changed files with 3 additions and 7 deletions

View File

@ -16,10 +16,7 @@ steps:
from_secret: docker_pw from_secret: docker_pw
repo: mollre/journal-bot repo: mollre/journal-bot
tags: tags: 1.0.${DRONE_BUILD_NUMBER}
- 1.0.${DRONE_BUILD_NUMBER}
- latest
build_args: "BOT_VERSION=1.0.${DRONE_BUILD_NUMBER}"
trigger: trigger:

View File

@ -4,7 +4,7 @@ import socket
from telegram.ext import ConversationHandler, CommandHandler, CallbackQueryHandler from telegram.ext import ConversationHandler, CommandHandler, CallbackQueryHandler
from telegram import InlineKeyboardButton, InlineKeyboardMarkup from telegram import InlineKeyboardButton, InlineKeyboardMarkup
from telegram.constants import ParseMode from telegram.constants import ParseMode
import os
FIRST = 1 FIRST = 1
@ -37,7 +37,7 @@ class StatusHandler(BaseHandler):
reply_markup = InlineKeyboardMarkup(keyboard) reply_markup = InlineKeyboardMarkup(keyboard)
delta = str(datetime.datetime.now() - self.start_time) delta = str(datetime.datetime.now() - self.start_time)
message = "BeebBop, this is Norbit...\n" message = "BeebBop, this is Norbit\n"
try: try:
ip = httpx.get('https://api.ipify.org').text ip = httpx.get('https://api.ipify.org').text
@ -50,7 +50,6 @@ class StatusHandler(BaseHandler):
local_ips = "not fetchable" local_ips = "not fetchable"
message += "Status: Running 🟢\n" message += "Status: Running 🟢\n"
message += f"Version: `{os.getenv('BOT_VERSION', 'dev')}`\n"
message += f"Uptime: `{delta[:delta.rfind('.')]}`\n" message += f"Uptime: `{delta[:delta.rfind('.')]}`\n"
message += f"IP \(public\): `{ip}`\n" message += f"IP \(public\): `{ip}`\n"
message += f"IP \(private\): `{local_ips}`\n" message += f"IP \(private\): `{local_ips}`\n"