repo.py 884 B

1234567891011121314151617181920212223242526
  1. from pyrogram import filters
  2. from wbb import app
  3. from wbb.core.decorators.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']})\n"
  16. count += 1
  17. text = f"""[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)