main.py 491 B

123456789101112131415161718
  1. from pyrogram import Client, filters
  2. import random
  3. app = Client("WilliamButcher")
  4. def random_line(fname):
  5. lines = open(fname).read().splitlines()
  6. return random.choice(lines)
  7. @app.on_message(filters.command(commands = (["start"])))
  8. async def start(client, message):
  9. await message.reply_text(random_line('start.txt'))
  10. @app.on_message(filters.command(commands = (["commit"])))
  11. async def commit(client, message):
  12. await message.reply_text(random_line('commit.txt'))
  13. app.run()