Skip to content

Conversation

@Navaneeth-Renjith
Copy link

Changes

  • Fixed typos
  • Added refresh button for logs
  • Added callback data for "refresh_log"
    • Allowed to edit document if message is log file
  • Removed "OKDa"

Fixed typos

Fixed some typos in commands.py file.

HOME_TEXT = "<b>Hey  [{}](tg://user?id={}) 🙋‍♂️\n\nI'm a Bot built to Play or Stream Videos in Telegram Video Chats.\nI can Stream any YouTube Video or a Telegram File or even a YouTube Live.</b>"

Added refresh button for logs

Just added button for refreshing logs whenever you want.

button=[
    [
        InlineKeyboardButton(text='🔁 Refresh Logs', callback_data='recheck_log'),
        InlineKeyboardButton(text='🗑️ Close', callback_data='close'),
    ]
]

Added callback data for "recheck_log"

Just added callback data for button to refresh logs.

Allowed to edit document if message is log file

Allowed to edit the file if the query message is a document.

if os.path.exists('botlog.txt'):
    if query.message.document:
        await query.message.edit_document(
            'botlog.txt',
            caption="Bot Logs",
            reply_markup=button
         )
         await delete_messages([message])
    else:
        await query.message.delete()
        await message.reply_document(
            'botlog.txt',
            caption="Bot Logs",
            reply_markup=button
        )
        await delete_messages([message])
# rest of the code...

Removed "OKDa"

Simply removed text "OKDa" because all people didn't know it's meaning. 😅

@subinps

* Fixed typos
* Added refresh log button for logs
* Removed "OKDa"
* Added callback for "recheck_log"
* Fixed typos
* Removed "OKDa"
* Allowed to edit document if message is log file
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant