Giter VIP home page Giter VIP logo

twitchio's Introduction

./logo.png?raw=true

TwitchIO is an asynchronous Python wrapper around the Twitch API and IRC, with a powerful command extension for creating Twitch Chat Bots. TwitchIO covers almost all of the new Twitch API and features support for commands, PubSub, Webhooks, and EventSub.

Documentation

For the Official Documentation: Click Here!

Support

For support using TwitchIO, please join the official support server on Discord.

Discord

Installation

TwitchIO requires Python 3.7+. You can download the latest version of Python here.

Windows

py -m pip install -U twitchio

Linux

python -m pip install -U twitchio

Access Tokens

Visit Token Generator for a simple way to generate tokens for use with TwitchIO.

Getting Started

A simple Chat Bot.

from twitchio.ext import commands


class Bot(commands.Bot):

    def __init__(self):
        # Initialise our Bot with our access token, prefix and a list of channels to join on boot...
        super().__init__(token='ACCESS_TOKEN', prefix='?', initial_channels=['...'])

    async def event_ready(self):
        # We are logged in and ready to chat and use commands...
        print(f'Logged in as | {self.nick}')

    @commands.command()
    async def hello(self, ctx: commands.Context):
        # Send a hello back!
        await ctx.send(f'Hello {ctx.author.name}!')


bot = Bot()
bot.run()

Contributing

TwitchIO 2.0 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 TwitchIO 2.0 is 120.

For installation and usage of Black visit: Black Formatter

For integrating Black into your IDE visit: Black IDE Usage

Special Thanks

Thank you to all those who contribute and help TwitchIO grow.

Special thanks to:

SnowyLuma

Harmon

Tom

Tesence

Adure

Scragly

Chillymosh

If I have forgotten anyone please let me know <3: EvieePy

twitchio's People

Contributors

aticie avatar atzix avatar bpafoshizle avatar bsquidwrd avatar chillymosh avatar dschogo avatar evieepy avatar iamtomahawkx avatar izzy avatar joelsgp avatar leandcesar avatar lint-action avatar luissilva1044894 avatar nihaals avatar parmenashp avatar rn4n avatar scragly avatar spigot avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.