Giter Club home page Giter Club logo

twitchplays's People

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

twitchplays's Issues

It reads messages but the keys seem to be wrong

Hi, I'm running the program, it reads the messages but the keys seem to be wrong. If the chat messages is "left" the program will give me "a" as a keystroke, if the message is "right" it gives me "d"...
These are the only keystrokes I've found so far, with trial and error. What am I doing wrong? I haven't modified any of the files apart from the template one.
Does it have to do with the fact that I have an italian keyboard?

Missing `LICENSE` File

I know you added in the README.md that You are welcome to use or adapt this code for your own content. but no LICENSE file.
If there is a LICENSE file it would explain in more detail on what you can do with your source code.

Allow same user to send multiple same commands

Currently Twitch handles repeating commands like this:

  1. "down" = "down"
  2. "down" = "down [?]" (adds (?) after command, since it thinks it's spam)
  3. "down" = "down
  4. "down" = "down [?]"

to omit this I changed the code in TwitchPlays_TEMPLATE.py (line 62) so the msg variable works anyways:

def handle_message(message):
    try:
        msg = message['message'].lower()
        chat_cmd = msg.split(" ")

        if len(chat_cmd) > 1 and isinstance(chat_cmd[1], str) and len(chat_cmd[1]) > 1 and chat_cmd[1] not in ['right', 'up']:
            print('ignore sentence')
        else:
            msg = chat_cmd[0]

Logic is:
if the command has multiple parts like "down [?]", split the string at the space and if the second part has only 1 character (like a "?") set msg = the first part before the space, so it counts as a valid command.
Additionally check if the second part after the space is longer than 1 character (could be a sentence in chat starting with a command word) ignore that by keeping the msg as is.

Before you created your repo, I created a version of your TwitchPlays code

Before you had a github for this, I downloaded it and put some work into making it more user friendly

I see you have updated some of the connection stuff and your template(TwitchPlays.py in my repo)

Here's a link to what I did early this year
https://github.com/jfp1992/Twitch_Plays

keys_dictionary.py - a hash map for pulling the key codes
keys_base_class.py - contains a class with some methods to make key actions easy to code
https://github.com/jfp1992/Twitch_Plays/blob/main/mouse_base_class.py - contains a class with some methods to make mouse actions easy to code

I'd love to keep working on my additions(especially now that I have a ton more experience), but it doesn't feel right doing so, now that you have yours on github.

A few options
We could collaborate
I can delete my repo
Leave both as is

Thoughts?

how do i use on linux???

i am confused on how i can use this software in arch linux
Traceback (most recent call last):
File "/home/restruct/TwitchPlays/TwitchPlays_TEMPLATE.py", line 4, in
import pydirectinput
File "/home/restruct/TwitchPlays/tp/lib/python3.11/site-packages/pydirectinput/init.py", line 6, in
SendInput = ctypes.windll.user32.SendInput
^^^^^^^^^^^^^
AttributeError: module 'ctypes' has no attribute 'windll'
here is the error that i got when i tried to run it

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.