repo.py 877 B

12345678910111213141516171819202122232425262728
  1. from pyrogram import filters
  2. from wbb import app
  3. from wbb.utils.errors import capture_err
  4. from wbb.utils.fetch import fetch
  5. __MODULE__ = "Repo"
  6. __HELP__ = "/repo - To Get My Github Repository Link " \
  7. "And Support Group Link"
  8. @app.on_message(filters.command("repo") & ~filters.edited)
  9. @capture_err
  10. async def repo(_, message):
  11. users = await fetch("https://api.github.com/repos/thehamkercat/williambutcherbot/contributors")
  12. list_of_users = ""
  13. count = 1
  14. for user in users:
  15. list_of_users += f"**{count}.** [{user['login']}]({user['html_url']})"
  16. count += 1
  17. text = """[Github](https://github.com/thehamkercat/WilliamButcherBot) | [Group](t.me/PatheticProgrammers)
  18. ```----------------
  19. | Contributors |
  20. ----------------```
  21. {list_of_users}"""
  22. await app.send_message(message.chat.id, text=text, disable_web_page_preview=True)