Code Monkey home page Code Monkey logo

twitchio's Introduction

https://raw.githubusercontent.com/TwitchIO/TwitchIO/master/logo.png

PyPI - Downloads

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}')
        print(f'User id is | {self.user_id}')

    @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 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 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:

LostLuma (Lilly)

Harmon

Tom

Tesence

Adure

Scragly

Chillymosh

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

twitchio's People

Contributors

abstractumbra avatar adambirds avatar bairdmci avatar bpafoshizle avatar bsquidwrd avatar charlesmadere avatar chillymosh avatar cnyanime avatar deadm8 avatar dnns01 avatar dschogo avatar evieepy avatar iamtomahawkx avatar jbot-the-dev avatar kai-py avatar lint-action avatar lostluma avatar ragnatz avatar rn4n avatar roadcrosser avatar roberterobert avatar scragly avatar sigmathbits avatar sockheadrps avatar splaudpanther avatar tiagovla avatar tkdrob avatar tutorexilius avatar vgr255 avatar xakka avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

twitchio's Issues

Implement Command Cooldowns

Implement a cooldowns system for Commands.

The system should support multiple cooldown buckets on the same command.

It should have predicate bypassing.

Shared Cooldowns might be implemented later, but at this stage needs further discussion.

CommandOnCooldown error(s) should be provided all at once, e.g 2 buckets hit a cooldown on the same invocation, so both errors should be returned to the user.

Cooldowns need a simple to use decorator.

Cooldowns should implement utility functions, like reset, get_tokens, get_bucket, etc

Add Rate Limit Handler for Join Channels

The Join Channels Handler should now handle joining 50 and above channels at once without hitting Twitch RateLimits.

This still needs some minor testing, but initial tests have proven well.

Setting name= in the command decorator prevents using the func name to invoke.

Describe the bug
Setting name= in the command decorator prevents using the func name to invoke the command. You should be able to use all aliases the set name and the function name to invoke the command.

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
2.0.0.a1

To Reproduce
Steps to reproduce the behaviour:
Create a command with bot.command(name='test') and try to invoke the command with the function name.

Expected behaviour
Function name invokes the command

event_join user not returning user tags and gives error on checking for mod/sub

Describe the bug
While trying to grab user information when it joins the channel, it returns empty tags and gives error when trying to check for mod.

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
pip show twitchio
Version 2.0.0a1

To Reproduce
Steps to reproduce the behaviour:

    async def event_join(self, channel, user):
        print(dir(user))
        print(f'User joined: ' + str(user.name))
        print(f'User tags: '  + str(user._tags))
        print(f'User is mod: '  + str(user.is_mod))

It returns

['__abstractmethods__', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__invalid__', '__le__', '__lt__', '__messageable_channel__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '_abc_impl', '_bot', '_bot_is_mod', '_channel', '_colour', '_display_name', '_fetch_channel', '_fetch_websocket', '_mod', '_name', '_sub', '_tags', '_turbo', '_ws', 'channel', 'check_bucket', 'check_content', 'color', 'colour', 'display_name', 'id', 'is_mod', 'is_subscriber', 'is_turbo', 'name', 'send']
User joined: botdescolado
User tags: None
Task exception was never retrieved
future: <Task finished coro=<Bot.event_join() done, defined at D:/Python/Python37-32/bot.py:21> exception=AttributeError('_mod')>
Traceback (most recent call last):
  File "D:/Python/Python37-32/bot.py", line 25, in event_join
    print(f'User is mod: '  + str(user.is_mod))
  File "C:\Users\MOA\AppData\Roaming\Python\Python37\site-packages\twitchio\user.py", line 150, in is_mod
    if self._mod == 1:
AttributeError: _mod

Expected behaviour
The same thing when you check during messages.
With the code:

    @commands.command(name='test')
    async def test(self, ctx):
        print(dir(ctx.author))
        print(f'User joined: ' + str(ctx.author.name))
        print(f'User tags: '  + str(ctx.author._tags))
        print(f'User is mod: '  + str(ctx.author.is_mod))

It returns

['__abstractmethods__', '__class__', '__delattr__', '__dir__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__init_subclass__', '__invalid__', '__le__', '__lt__', '__messageable_channel__', '__module__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__slots__', '__str__', '__subclasshook__', '_abc_impl', '_bot', '_bot_is_mod', '_channel', '_colour', '_display_name', '_fetch_channel', '_fetch_websocket', '_mod', '_name', '_sub', '_tags', '_turbo', '_ws', 'channel', 'check_bucket', 'check_content', 'color', 'colour', 'display_name', 'id', 'is_mod', 'is_subscriber', 'is_turbo', 'name', 'send']
User joined: soudescolado
User tags: {'@badge-info': 'subscriber/1', 'badges': 'broadcaster/1,subscriber/0,sub-gifter/1', 'color': '#0000FF', 'display-name': 'SouDescolado', 'emotes': '', 'flags': '', 'id': '81dba407-0b76-436a-930a-2562e90c17b5', 'mod': '0', 'room-id': '37497308', 'subscriber': '1', 'tmi-sent-ts': '1567101602103', 'turbo': '0', 'user-id': '37497308', 'user-type': ''}
User is mod: True

Screenshots
None needed I think

(please complete the following information):

  • OS: Windows 7

Additional context
Also, there is a lack of the "badges" attribute on user, and the documentation mentions that event_join just need the user, when it actually needs both channel and user

TEST ISSUE

Issue for TwitchIO Manager Bot testing.

unload_module does not work if name parameter is used in commands.cog decorator

Describe the bug
When using the optional parameter name in the commands.cog decorator this name is stored in bot.cogs

When the cog is meant to be unloaded cogname retrieved from inspect.getmembers(module) is the class.__ name __ instead so it never matches and therefor is never unloaded properly

E.g.
@commands.cog(name = 'General Commands')
class GeneralCommands():

bot.cogs has stored 'General Commands'

cogname from inspect.getmembers(module) is 'GeneralCommands' instead

The check is now:
if 'GeneralCommands' in self.cogs ('General Commands' is stored here):
...

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
1.0.0

To Reproduce
Set the optional name attribute in the commands.cog decorator

Expected behaviour
Modules should be unloaded correctly. E.g. store class.__ name __ in self.cogs instead of the .name attribute

(please complete the following information):

  • OS: Ubuntu 18.04

Add echo messages.

Echo messages should be an optional add on to the bot, which simply echos back the message sent as if it were sent via Twitch.

Incomplete Message.raw_data

Description
Message.raw_data for Message objects received through event_message only contains a subsection of the raw data.

Reproduction Steps
Using the following event handler:

@bot.event
async def event_message(message):
    print(message.raw_data)

sending a message will result in {nick}!{nick}@{nick}.tmi.twitch.tv being printed.

Expected Behaviour
Message.raw_data should contain the entire raw data string, including badges, action, channel, and content.

Additional Context
The relevant code:
https://github.com/TwitchIO/TwitchIO/blob/4bbbd5941985013bc1393b1f3815e750285a1a05/twitchio/websocket.py#L389-L393 https://github.com/TwitchIO/TwitchIO/blob/4bbbd5941985013bc1393b1f3815e750285a1a05/twitchio/websocket.py#L416

Using version 0.0.4a237+627bdbd on Microsoft Windows 7 (64-bit) [Version 6.1.7601], without a Discord Bot.

Known/Verified Bots Rate Limits

In cooldowns.py, the correct Rate Limits for normal users/bots are used. However, as the docs state, one may be a known or verified bot, giving increased rate limits.

This ought to be reflected in the code; I will open a PR later today if i get the chance.

The information about an account being a known or verified bot can be gotten from kraken / v5 via https://api.twitch.tv/kraken/users/<id>/chat

get_users,get_streams,get_stream|Not working as intended/broken

Describe the bug
A clear and concise description of what the bug is.
get_users, type is always blank even if the channel is live or not.(Shown in pictures)
get_streams, return is always blank when imputing channel names/ id's (Shown in pictures)
get_stream, returns None when a channel is offline but if its online it freezes/breaks and nothing under the code will be executed(shown in pictures).

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
1.0.0

To Reproduce
Steps to reproduce the behaviour:
code is shown in pictures, if you need full code tell me.

Expected behaviour
A clear and concise description of what you expected to happen.
How the wiki explains it.

Screenshots
If applicable, add screenshots to help explain your problem.

https://i.imgur.com/aJW4kse.png Online
https://i.imgur.com/Of9ZAbX.png Offline

(please complete the following information):
tried on Windows 10 and linux
tried on Python 3.7.5 and 3.6.2

Additional context
Add any other context about the problem here.

Here is a fix I wrote for myself not using twitchio

import urllib.request
import urllib.error
import json

def liveCheck( chan_name  ):
    try:
        url = f"https://api.twitch.tv/helix/streams?user_login={chan_name}"
        heading = {
            "Client-ID": "myOauth"
        }
        req = urllib.request.Request( url , headers = heading )
        response = urllib.request.urlopen( req )
        output = json.loads( response.read() )
        output = output["data"]
        for i in output:
            output = i
        if "type" in output:
            return True
        else:
            return False
    except Exception as e:
        print( 'gettwitchapi' , e )
        return e

Using HTTP without client id

Describe the bug
There should be a better error if you try to use an endpoint e.g. users without giving a client id

To Reproduce
Create an instance of a Bot without giving client id then run .get_users('twitch').

Expected behaviour
It is clear that the error is caused because of no client id or an error should be raised beforehand.

Connection Refused

I been using my bot for a while now using your API. Everything if fine. But this is what happens when I try to run commands. It was working for a while and nothing has changed.

Ignoring exception in ConnectionRefusedError:
Traceback (most recent call last):
  File "/home/pi/.local/lib/python3.5/site-packages/twitchio/base.py", line 205, in keep_alive
    await self.process_data(data)
  File "/home/pi/.local/lib/python3.5/site-packages/twitchio/base.py", line 255, in process_data
    await self.process_actions(data, _groupsdict, tags)
  File "/home/pi/.local/lib/python3.5/site-packages/twitchio/base.py", line 310, in process_actions
    await self.event_message(message)
  File "./tenebe.py", line 36, in event_message
    s.connect((host, port))
ConnectionRefusedError: [Errno 111] Connection refused

Also love the API keep up the good work.

Callable initital_channels

Initial channels should allow for any callable to be provided, as long as it returns a string or an list/tuple.

modify_webhook_subscription fails on subscription verification

Describe the bug
When using bot.modify_webhook_subscription(), it fails with the following exception:

[...]
File "G:\Py\virtualenv\twitch_py37\lib\site-packages\twitchio\http.py", line 109, in _request
    if 'application/json' in resp.headers.get('content-type'):
TypeError: argument of type 'NoneType' is not iterable

It seems to be caused by the subscription verification request (see "Subscription Verify Request" here) since it doesn't have a content-type field.
Modifying line 109 in twitchio\http.py from

if 'application/json' in resp.headers.get('content-type'):

to

if resp.headers.get('content-type') and 'application/json' in resp.headers.get('content-type'):

solves the issue

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
Version: 0.0.3a206+ae55763

To Reproduce
Steps to reproduce the behaviour:

  1. Run the bot
  2. Try using bot.modify_webhook_subscription()

Expected behaviour
The subscription is modified with no exceptions thrown :)

Screenshots
Not applicable

(please complete the following information):

  • OS: Windows 10

.

.

Feature: Bits Topic

Describe the bug
Not a bug but a self-fulfilling request for a new feature that I'm working on in a fork: just want to track it here.

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
9b07178

To Reproduce
n/a

Expected behaviour
Ability to interact with helix/bits

Screenshots
n/a

(please complete the following information):

  • OS: Windows 10

Additional context
n/a

Issue recieving whispers

i tried
async def event_message(self, message):
print(message)
await self.handle_commands(message)

but it doesn't recive whispers
how should i do to recieve/read whispers?
Version: 1.0.0 - windows

ValueError with no initial channels

Description
When no initial channels are specified, a ValueError occurs:

Traceback (most recent call last):
  File "C:\Program Files\Python37\lib\site-packages\twitchio\websocket.py", line 336, in process_data
    await asyncio.wait(futures)
  File "C:\Program Files\Python37\lib\asyncio\tasks.py", line 354, in wait
    raise ValueError('Set of coroutines/Futures is empty.')
ValueError: Set of coroutines/Futures is empty.

Reproduction Steps
Instantiate a Bot instance without specifying initial_channels
Run the bot using Bot.run
Observe error

Expected Behaviour
The bot should run normally without error.

Additional Context
This also stops the ready event from dispatching.
The relevant code:
https://github.com/TwitchIO/TwitchIO/blob/2eeb5b8b0babba8a07bf1c7c7d94c26c2b2ba84d/twitchio/websocket.py#L321-L339

Using version 0.0.4a219+2eeb5b8 on Microsoft Windows 7 (64-bit) [Version 6.1.7601], without a Discord Bot.

Issue with whispering users

When I try to whisper a user use ctx.author.send("message") it tells me that the dataclass User has no attribute send. Is there a different way of doing this?

Command to make the bot join a chat

Hi, are there any function to use if you want the bot to join a chat? My thought are to run this command when something posts to a flask call, and them make the bot join the server.

I might have missed it in the documentation.

Websocket Exceptions

Describe the bug
After running the example code 3 exceptions appear in the console. The bot does seem to enter the Twitch room and respond to commands. The main issue is these errors can mask real issues when expanding past the example.

First is an error with join_action in twitchio/websocket.py:558 stating the task to join never finished.

Second is an error with _join_channe stating the task timed out and to check if the channel exists.

Third is an error with WebSocketCommonProtocol.close stating self._websocket.close() was never awaited. This happens when I stop the bot with ctrl+c

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
1.0.0

To Reproduce
Steps to reproduce the behaviour:
Use the following code with a valid irc_token:
Code Snippet

Expected behaviour
No exceptions in the console when using the example code.

Screenshots
I don't have screenshots, but I do have logs

(please complete the following information):

  • OS: Mac Majave
  • Shell: zsh and bash
  • Python 3.7

Additional context
N/A

Example bots have import error

Describe the bug

Example bots throw import error 
ImportError: cannot import name 'commands' from 'twitchio' (<path to>/twitchio/twitchio/__init__.py)

Are you using TwitchIO within a Discord Bot?

No

What commit of TwitchIO are you using?

Version: 0.0.1a73+6c6042a

To Reproduce Steps to reproduce the behaviour:

clone TwitchIO
run either basic_bot.py or subclass_bot.py

Expected behaviour

The bot should launch and connect to Twitch

Screenshots If applicable, add screenshots to help explain your problem.

OS: Ubuntu

Additional context Add any other context about the problem here.

changing the first line of either to `from twitchio.ext import commands`
seems to fix the import error, although I still do not see the bot appear in my Twitch channel since this update.

Webhook ext

Webhook Extension, should be completed along side the HTTP endpoints.

Bot object has no attribute

Describe the bug
Running the example script, bots connect to the chat but send :

python3 main,py
Ready | lightshow
ThIS IS A TEST
Task exception was never retrieved
future: <Task finished coro=<Bot.event_message() done, defined at main.py:14> exception=AttributeError("'Bot' object has no attribute 'process_commands'",)>
Traceback (most recent call last):
  File "main.py", line 16, in event_message
    await self.process_commands(message)
AttributeError: 'Bot' object has no attribute 'process_commands'

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?

Metadata-Version: 1.1
Name: twitchio
Version: 0.0.3a210+50eb5ae
Summary: A python IRC and API wrapper for Twitch.
Home-page: https://github.com/EvieePy/TwitchIO

To Reproduce
Steps to reproduce the behaviour:
Run the example script

(please complete the following information):

  • OS: [Ubuntu 16.04.5 LTS]

Additional context

Test

This is a test

Type conversion of default value for command keyword-only argument (defaulting to string)

Description
When a command with a keyword-only argument default value of None without an annotation is used without any input (additional to the necessary required arguments), the keyword-only argument defaults to "None".

Reproduction Steps
The command:

@commands.command()
async def test(self, ctx, *, kwarg = None):
    print(kwarg)
    print(type(kwarg))
    print(kwarg == "None")

will print

None
<class 'str'>
True

when executed with !test (with prefix set to !).

Expected Behaviour
The keyword-only argument should default to None instead of "None", and the above command should print

None
<class 'NoneType'>
False

when executed.

Additional Context
If an annotation is used, this can also cause a BadArgument error if None cannot be converted to the specified type. This also applies for default values other than None.
The relevant code:
https://github.com/TwitchIO/TwitchIO/blob/2eeb5b8b0babba8a07bf1c7c7d94c26c2b2ba84d/twitchio/ext/commands/core.py#L58-L63 https://github.com/TwitchIO/TwitchIO/blob/2eeb5b8b0babba8a07bf1c7c7d94c26c2b2ba84d/twitchio/ext/commands/core.py#L105-L111

Using version 0.0.4a219+2eeb5b8 on Microsoft Windows 7 (64-bit) [Version 6.1.7601], without a Discord Bot.

Message._timestamp not set on commands that exist

Describe the bug
When running a command that exists, it seems the Message._timestamp attribute doesn't exist

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
0.0.4a295+665c7ce

To Reproduce
Steps to reproduce the behaviour:

  1. Create a bot with cogs/modules
  2. Create a function in the Bot class event_message
  3. Put some way to show the timestamp of every message (print(message.timestamp))
  4. Run the bot
  5. Run a command that doesn't exist -> get timestamp
  6. Run a command that does exist -> get error

Expected behaviour
Have timestamp set on every message, no matter what.

Screenshots

(please complete the following information):

  • OS: Windows 10 64bit

Additional context

future: <Task finished coro=<Bot.event_message() done, defined at .\bot.py:54> exception=AttributeError('_timestamp')>
Traceback (most recent call last):
  File ".\bot.py", line 57, in event_message
    timestamp = message.timestamp
  File "D:\Personal\Resilio Sync\My Files\twitch_bot\env\lib\site-packages\twitchio\dataclasses.py", line 88, in timestamp
    timestamp = datetime.datetime.utcfromtimestamp(self._timestamp/1000)
AttributeError: _timestamp

Falsey default value for command keyword-only argument raises MissingRequiredArguments

Description
When a command with a falsey keyword-only argument default value besides None is used without any input (additional to the necessary required arguments), MissingRequiredArguments is raised.

Reproduction Steps
The command:

@commands.command()
async def test(self, ctx, *, kwarg = ""):
    ...

will raise MissingRequiredArguments when executed with !test (with prefix set to !).

Expected Behaviour
The command should execute normally with the keyword-only argument set to the default value.

Additional Context
The relevant code:
https://github.com/TwitchIO/TwitchIO/blob/2eeb5b8b0babba8a07bf1c7c7d94c26c2b2ba84d/twitchio/ext/commands/core.py#L105-L111

Using version 0.0.4a219+2eeb5b8 on Microsoft Windows 7 (64-bit) [Version 6.1.7601], without a Discord Bot.

__init__() got an unexpected keyword argument 'loop'

initial_channels=['botagnes'])
File "C:\Users\holec\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twitchio\ext\commands\bot.py", line 93, in init
super().init(loop=self.loop, client_id=client_id, **attrs)
File "C:\Users\holec\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twitchio\client.py", line 45, in init
self.http = HTTPSession(loop=loop, client_id=client_id)
File "C:\Users\holec\AppData\Local\Programs\Python\Python37-32\lib\site-packages\twitchio\http.py", line 48, in init
self._session = aiohttp.ClientSession(loop=loop)
TypeError: init() got an unexpected keyword argument 'loop'

Incomplete raw data for Echo-Messages

Description
Data received through event_raw_data for Echo-Messages only contains a subsection of the raw data.

Reproduction Steps
Using the following event handler:

@bot.event
async def event_raw_data(data):
    print(data)

having the bot send a message will result in {nick}!{nick}@{nick}.tmi.twitch.tv being printed.

Expected Behaviour
The data received through event_raw_data (for Echo-Messages) should contain the entire raw data string, including action (PRIVMSG(ECHO-MESSAGE)), channel, and content.

Additional Context
The relevant code:
https://github.com/TwitchIO/TwitchIO/blob/4bbbd5941985013bc1393b1f3815e750285a1a05/twitchio/websocket.py#L389-L393 https://github.com/TwitchIO/TwitchIO/blob/4bbbd5941985013bc1393b1f3815e750285a1a05/twitchio/websocket.py#L457

Using version 0.0.4a237+627bdbd on Microsoft Windows 7 (64-bit) [Version 6.1.7601], without a Discord Bot.

SyntaxError on import in py3

Describe the bug
SyntaxError exception thrown on import twitchio in Python3

Are you using TwitchIO within a Discord Bot?
No

What commit of TwitchIO are you using?
pip show twitchio

Metadata-Version: 1.1
Name: twitchio
Version: 0.0.3a206+ae55763
Summary: A python IRC and API wrapper for Twitch.
Home-page: https://github.com/EvieePy/TwitchIO
Author: EvieePy
Author-email: UNKNOWN
License: MIT
Location: /home/skippern/.local/lib/python3.5/site-packages
Requires: aiohttp, async-timeout, websockets
Classifiers:
  Development Status :: 2 - Beta
  License :: OSI Approved :: MIT License
  Intended Audience :: Developers
  Natural Language :: English
  Operating System :: OS Independent
  Programming Language :: Python :: 3.6
  Programming Language :: Python :: 3.7
  Topic :: Internet
  Topic :: Software Development :: Libraries
  Topic :: Software Development :: Libraries :: Python Modules
  Topic :: Utilities

To Reproduce

  • Clone repository rewrite branch
  • install with python3 -m pip install -U . when standing in repo directory
  • run python3 and import twitchio

Expected behaviour
A clear and concise description of what you expected to happen.

Screenshots

python3
Python 3.5.2 (default, Nov 23 2017, 16:37:01) 
[GCC 5.4.0 20160609] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> import twitchio
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/opt/src/TwitchIO/twitchio/__init__.py", line 35, in <module>
    from .dataclasses import Context, Message, User, Channel
  File "/opt/src/TwitchIO/twitchio/dataclasses.py", line 32, in <module>
    from .abcs import Messageable
  File "/opt/src/TwitchIO/twitchio/abcs.py", line 99
    raise TwitchIOBException(f'IRC Message rate limit reached for channel <{channel}>.'
                                                                                      ^
SyntaxError: invalid syntax
>>> 

(please complete the following information):

  • OS: [Ubuntu 14.04]
  • Python: 3.6.3

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.