Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
1.2 kB
1
Indexable
Never
import os
import glob
from subprocess import call
from telegram import InlineKeyboardButton, InlineKeyboardMarkup, Update
from telegram.ext import Updater, CommandHandler, CallbackQueryHandler, CallbackContext
import json

class Pertanyaan:
    def pertanyaan_negara(update, context):
        butt_pilihan_satu = [
            InlineKeyboardButton("Negara Indonesia", callback_data="negara_indonesia"),
            InlineKeyboardButton("Negara Amerika", callback_data="negara_amerika")
        ]
        reply_markup = InlineKeyboardButton(butt_pilihan_satu)
        update.message.reply_text("Silakan pilih negara:", reply_markup=reply_markup)

    def pertanyaan_bahasa(update, context):
        butt_pilihan_dua = [
            InlineKeyboardButton("Bahasa Indonesia", callback_data="bahasa_indonesia"), InlineKeyboardButton("English Language",callback_data="english_language")
        ]
        reply_markup = InlineKeyboardButton(butt_pilihan_dua)
        update.message.reply_text("Silakan pilih bahasa:", reply_markup=reply_markup)

class Jawaban:
    def pil_negara_indonesia(update, context):
        with open('pilihan_negara.json', 'w') as f:
            json.dump()