{"repo":"DaCasBe/TwitchPy","free":true,"listed":false,"github":"https://github.com/DaCasBe/TwitchPy","clone":"git clone https://github.com/DaCasBe/TwitchPy.git","description":"TwitchPy is a Python package for using the Twitch's API and create bots for interacting with their IRC chats.","language":"Python","stars":37,"topics":["twitch","twitch-api","twitch-bot","api","package","python3","python","python-twitch-api","irc-bot","irc-client"],"license":"GPL-3.0","category":"api-integrations-sdks","readme_excerpt":"TwitchPy TwitchPy is a Python package for using the Twitch's API and create bots for interacting with their IRC chats. Documentation Click here to see the official documentation. Installation TwitchPy requires Python 3.10 or higher. You can download the latest version of Python here. pip install twitchpy Getting started A basic bot. python from datetime import datetime from twitchpy.bot import Bot bot = Bot( \"your oauth token\", \"your client id\", \"your client secret\", \"your redirect uri\", \"tokens file path\", \"login of your bot\", [\"channels list to read from\"], \"!\", ) time = datetime.now() def example check(): global time time diff = datetime.now() - time if time diff.seconds = 5: bot.me(\"any channel login\", \"This message is sent every 5 seconds\") time = datetime.now() def example listener(message): if message.user is not None: bot.me(\"any channel login\", f\"{message.user} said: {message.text}\") def example command(message): bot.me(\"any channel login\", f\"{message.user} is who called me\") bot.add check(\"example check\", example check) bot.add listener(\"example listener\", example listener) bot.add command(\"example command\", example command) bot.run() Contributing TwitchPy currently uses the Black formatter to enforce sensible style formatting. Before creating a pull request it is encouraged you install and run black on your code. The line length limit for TwitchPy is 88. For installation and usage of Black visit: Black Formatter For integrating Black into your IDE visit: Black IDE ","default_branch":null,"files":null,"tree":[],"storefront":"/r/DaCasBe","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/DaCasBe/TwitchPy/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}