Code Monkey home page Code Monkey logo

asynctwitch's People

Contributors

adongy avatar martmists-gh avatar

Stargazers

 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

asynctwitch's Issues

Error when running something developed off of this

Traceback (most recent call last): File "bot.py", line 8, in <module> prefix = "!", File "/usr/local/lib/python3.5/dist-packages/asynctwitch-2.0.0-py3.5.egg/asynctwitch.py", line 606, in __init__ File "/usr/local/lib/python3.5/dist-packages/asynctwitch-2.0.0-py3.5.egg/asynctwitch.py", line 140, in __init__ AttributeError: module 'asyncio' has no attribute 'ProactorEventLoop'

I get this error when running something developed with this on Linux. On a quick check of the documentation, it seems that may be Windows only

add_timer not working

add_timer calls create_timer(message, time) without a channel. You just need to pass channel into that function and it should fix the prolbme

Thanks

Make a wiki

  • Describe all classes
  • Detailed information about all functions
  • Useful attributes
  • Information about events

Attempted to setup example project, when using commands in chat causes exception

File "C:\Users\honglouis\AppData\Local\Programs\Python\Python36-32\lib\site-packages\asynctwitch\bots.py", line 758, in _tcp_echo_client
yield from self.event_message(messageobj)
File "C:\Users\honglouis\AppData\Local\Programs\Python\Python36-32\lib\site-packages\asynctwitch\bots.py", line 1103, in event_message
yield from self.parse_commands(m)
File "C:\Users\honglouis\AppData\Local\Programs\Python\Python36-32\lib\site-packages\asynctwitch\bots.py", line 1127, in parse_commands
yield from self.commands[w].run(rm)
File "C:\Users\honglouis\AppData\Local\Programs\Python\Python36-32\lib\site-packages\asynctwitch\dataclasses.py", line 510, in run
if self.has != '':
AttributeError: 'Command' object has no attribute 'has'

Steps to Recreate:

  1. Setup Example project in README.md
  2. Start bot
  3. use !example in chat

Python Version: 3.6

bot.whisper mismatched variables

bot.whisper is passed message, but uses msg

corrected:
def whisper(self, user, message):
"""
Send a private message to a user

    Parameters
    ----------
    user : :class:`User`
        The user to send a message to.
    message : str
        The message to send.
    """
    yield from self._send_privmsg(user.channel, ".w {} {}".format(user.name, message))

bot.say not working

After the latest patch my commands have stopped working. I have been trying to debug why but i do not know your code so it is hard to do. This is what i have gathered so far however:

  • The bot is definitely still receiving the commands. I put a little print in my command to check that it is running. It is therefor the bot.say which is not returning anything.

  • It did work before the update. I also tried reducing the amount of channels in my list to 1. Still the same. Tried using a simple string variable for the channel to use the system that only uses one channel, same thing happened.

My best guess is that somewhere along the way the channel the message is supposed to send to gets lost. Could also be a variable type missmatch or a simple typo.

Subcommands not working

Subcommands are currently not working

Traceback (most recent call last):
  File "/var/bots/twitch/asynctwitch/bots.py", line 758, in _tcp_echo_client
    yield from self.event_message(messageobj)
  File "/var/bots/twitch/asynctwitch/bots.py", line 1103, in event_message
    yield from self.parse_commands(m)
  File "/var/bots/twitch/asynctwitch/bots.py", line 1127, in parse_commands
    yield from self.commands[w].run(rm)
  File "/var/bots/twitch/asynctwitch/dataclasses.py", line 549, in run
    yield from self.subcommands[subcomm].run(message)
  File "/var/bots/twitch/asynctwitch/dataclasses.py", line 511, in run
    args = message.content[len(self.bot.prefix):].split(" ")[1:]
AttributeError: 'SubCommand' object has no attribute 'bot'

Even with your example it's the same error. Any ideas?

Readme.md is outdated, the examples will not run properly.

I've just discovered my bots weren't saying anything is because you have to change this

# Example command:
@bot.command('example', alias=['moreexample','anothaone'], desc='example command')
async def example(message, word1:str, number1:int, rest:str):
    bot.say('wow');

to this

# Example command:
@bot.command('example', alias=['moreexample','anothaone'], desc='example command')
async def example(message, word1:str, number1:int, rest:str):
    await bot.say('channel', 'wow');

Multiple channels.

Could a multiple channel connections be implemented into this library? It would be nice to say use a list instead of a string variable for the channels and have the bot automatically work in each channel. Would it be more efficient than running a new instance of the bot for each channel or am i better off just making a new bot object for each channel i would like to connect to?

required positional argument: 'desc' error

I get the following error when running it:

Traceback (most recent call last):
File "D:\Projects\Python Projects\asynctwitch-master\bot.py", line 25, in
@say.subcommand('this')
File "D:\Projects\Python Projects\asynctwitch-master\asynctwitch\dataclasses.py", line 498, in subcommand
return SubCommand(self, *args, **kwargs)
TypeError: init() missing 1 required positional argument: 'desc'

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.