The project provides a pipeline DSL plugin that allows users to use buildpacks while developing a pipeline script in Jenkins.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def wrongCommand(update, context): | |
update.message.reply_text("Üzgünüm, gönderdiğiniz mesajı anlayamıyorum.") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from telegram.ext import Updater, CommandHandler, CallbackContext, MessageHandler, Filters | |
import os | |
import sys | |
TOKEN = os.getenv("TOKEN") | |
# Mode ortam değişkeni | |
mode = os.getenv("MODE") | |
# Mod'a uyarlı, updater başlatma fonksiyonu belirler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Mode ortam değişkeni | |
mode = os.getenv("MODE") | |
# Mod'a uyarlı, updater başlatma fonksiyonu belirler | |
if mode == "dev": | |
def run(updater): | |
print("Bot başlatıldı.") | |
updater.start_polling() | |
elif mode == "prod": | |
def run(updater): |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters | |
TOKEN = "[BOT_TOKEN]" | |
def run(updater): | |
print("Bot başlatıldı.") | |
updater.start_polling() | |
def start(update, context): | |
message = "Bot başlatıldı.\n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if __name__ == '__main__': | |
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def run(updater): | |
print("Bot başlatıldı.") | |
updater.start_polling() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def main(): | |
#Telegram Api güncellemelerini yakalayan bir Updater oluşturduk | |
updater = Updater(TOKEN, use_context=True) | |
# Api güncellemelerini yönlendirmek için Dispatcher oluşturduk | |
dp = updater.dispatcher | |
# Dispatchera komut yakalayıcılarımızı ekledik | |
dp.add_handler(CommandHandler("start", start)) | |
dp.add_handler(CommandHandler("yardim", help)) | |
dp.add_handler(CommandHandler("hakkinda", about)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if mode == "dev": | |
def run(updater): | |
updater.start_polling() | |
else: | |
sys.exit(1) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def about(update, context): | |
message = "Merhaba, ben bir test chatbotum.\n" | |
message += "Sana hizmet etmek için buradayım." | |
# Bot gönderilen mesaja özel yanıt döndürüyor | |
update.message.reply_text(message) |
NewerOlder