Skip to content

Instantly share code, notes, and snippets.

View fatiiates's full-sized avatar
🎯
Focusing

Fatih ATES fatiiates

🎯
Focusing
View GitHub Profile
@fatiiates
fatiiates / GSoC 21' Jenkins Plugins.md
Last active April 16, 2022 18:28
GSoC 21' CNB Jenkins Plugins Project Summary

ABSTRACT

The project provides a pipeline DSL plugin that allows users to use buildpacks while developing a pipeline script in Jenkins.

CONTENT

def wrongCommand(update, context):
update.message.reply_text("Üzgünüm, gönderdiğiniz mesajı anlayamıyorum.")
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
# 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):
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"
if __name__ == '__main__':
main()
def run(updater):
print("Bot başlatıldı.")
updater.start_polling()
@fatiiates
fatiiates / chatbot-main-second.py
Last active February 12, 2021 19:53
Medium Telegram Chatbot - Main Method 2nd
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))
@fatiiates
fatiiates / chatbot-updater-first.py
Last active February 13, 2021 13:57
Medium Telegram Chatbot - Updater First
if mode == "dev":
def run(updater):
updater.start_polling()
else:
sys.exit(1)
@fatiiates
fatiiates / chatbot-about-first.py
Last active January 31, 2021 20:29
Medium Telegram Chatbot - About Method
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)