Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Edited "commands.py" file #92

Open
wants to merge 4 commits into
base: main
Choose a base branch
from

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.

None yet

1 participant