Add button for /repo command

Co-authored-by: GudMeong <GudMeong@users.noreply.github.com>
This commit is contained in:
Hafitz Setya 2021-05-02 15:42:36 +07:00 committed by GitHub
parent 50b95b068c
commit 5894b540d8
Signed by untrusted user: GitHub
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,7 +8,7 @@ from sys import executable
from datetime import datetime from datetime import datetime
import pytz import pytz
import time import time
from telegram import ParseMode from telegram import ParseMode, InlineKeyboardMarkup, InlineKeyboardButton
from telegram.ext import CommandHandler, run_async from telegram.ext import CommandHandler, run_async
from bot import dispatcher, updater, botStartTime, AUTHORIZED_CHATS, IMAGE_URL from bot import dispatcher, updater, botStartTime, AUTHORIZED_CHATS, IMAGE_URL
from bot.helper.ext_utils import fs_utils from bot.helper.ext_utils import fs_utils
@ -65,9 +65,11 @@ def chat_list(update, context):
@run_async @run_async
def repo(update, context): def repo(update, context):
bot.send_message(update.message.chat_id, button = [
reply_to_message_id=update.message.message_id, [InlineKeyboardButton("Repo", url=f"https://github.com/breakdowns/slam-mirrorbot")],
text="Repo: https://github.com/breakdowns/slam-mirrorbot\nGroup: https://t.me/SlamMirrorSupport", disable_web_page_preview=True) [InlineKeyboardButton("Support Group", url=f"https://t.me/SlamMirrorSupport")]]
reply_markup = InlineKeyboardMarkup(button)
update.effective_message.reply_photo(IMAGE_URL, reply_markup=reply_markup)
@run_async @run_async