Compare commits
4 Commits
Author | SHA1 | Date |
---|---|---|
Misaki | 628b190dae | |
Misaki | 8e00afaa45 | |
Misaki | 271e3e68de | |
Misaki | 5a9f46b223 |
|
@ -0,0 +1,47 @@
|
||||||
|
#Mau mau das wird der Funi Bot
|
||||||
|
from telegram.ext import Updater, CommandHandler, MessageHandler, Filters
|
||||||
|
import logging
|
||||||
|
|
||||||
|
logging.basicConfig(format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
|
||||||
|
level=logging.INFO)
|
||||||
|
logger = logging.getLogger(__name__)
|
||||||
|
|
||||||
|
def start(update, context):
|
||||||
|
"""Send a message when the command /start is issued."""
|
||||||
|
update.message.reply_text('Hallo! Ich bin dein Echo-Bot. Sende mir eine Nachricht und ich werde sie wiederholen.')
|
||||||
|
|
||||||
|
def echo(update, context):
|
||||||
|
"""Echo the user message."""
|
||||||
|
update.message.reply_text(update.message.text)
|
||||||
|
|
||||||
|
def error(update, context):
|
||||||
|
"""Log Errors caused by Updates."""
|
||||||
|
logger.warning('Update "%s" caused error "%s"', update, context.error)
|
||||||
|
|
||||||
|
def main():
|
||||||
|
"""Start the bot."""
|
||||||
|
# Ersetzen Sie 'YOUR_TOKEN' mit Ihrem Bot-Token
|
||||||
|
updater = Updater("6885365398:AAHhgMRbUGfeS0VzKRmJvjKxSHfi18xESC4", use_context=True)
|
||||||
|
|
||||||
|
# Get the dispatcher to register handlers
|
||||||
|
dp = updater.dispatcher
|
||||||
|
|
||||||
|
# on different commands - answer in Telegram
|
||||||
|
dp.add_handler(CommandHandler("start", start))
|
||||||
|
|
||||||
|
# on noncommand i.e message - echo the message on Telegram
|
||||||
|
dp.add_handler(MessageHandler(Filters.text, echo))
|
||||||
|
|
||||||
|
# log all errors
|
||||||
|
dp.add_error_handler(error)
|
||||||
|
|
||||||
|
# Start the Bot
|
||||||
|
updater.start_polling()
|
||||||
|
|
||||||
|
# Run the bot until you press Ctrl-C or the process receives SIGINT,
|
||||||
|
# SIGTERM or SIGABRT. This should be used most of the time, since
|
||||||
|
# start_polling() is non-blocking and will stop the bot gracefully.
|
||||||
|
updater.idle()
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
main()
|
3
main.py
3
main.py
|
@ -3,8 +3,7 @@ print("Welcom Furry, Happy Birthday Generator")
|
||||||
name = input("Name Luck Furry: ")
|
name = input("Name Luck Furry: ")
|
||||||
age = input("Age the Furry: ")
|
age = input("Age the Furry: ")
|
||||||
sender = input("You Furry Name: ")
|
sender = input("You Furry Name: ")
|
||||||
print(" \n\n"
|
print(" \n\n")
|
||||||
"")
|
|
||||||
print("Hallo "+name+"," )
|
print("Hallo "+name+"," )
|
||||||
print("I Wish you a Yiff "+age+" Birthday.")
|
print("I Wish you a Yiff "+age+" Birthday.")
|
||||||
print("You are Welcome and E621 is the best")
|
print("You are Welcome and E621 is the best")
|
||||||
|
|
|
@ -1,3 +1,9 @@
|
||||||
Hiiii,
|
Hiiii,
|
||||||
|
|
||||||
Welcom to my Bullshit xDDD
|
Welcom to my Bullshit xDDD
|
||||||
|
|
||||||
|
[![forthebadge](https://forthebadge.com/images/badges/powered-by-coffee.svg)](https://forthebadge.com)
|
||||||
|
|
||||||
|
and meeee
|
||||||
|
|
||||||
|
[![forthebadge](https://forthebadge.com/images/badges/gluten-free.svg)](https://forthebadge.com)
|
Loading…
Reference in New Issue