joshuaskelly / twitch-observer

Turn Twitch chatter into Python events
MIT License
26 stars 6 forks source link

Update README, Cookbook and documentation #67

Open PythooonUser opened 6 years ago

PythooonUser commented 6 years ago

Summary

Since we are about to introduce many name regarding changes, we need to update the documentation accordingly.

The work needed to be done here is to:

PythooonUser commented 6 years ago

This is of course an issue to tackle after all the work is done!

senpos commented 6 years ago

Change the examples in the README

What about echo_bot example using the new on_event decorator?

from twitchobserver import Observer, ChatEventType

observer = Observer(<BOT_USERNAME>, <BOT_OAUTH>)
observer.join_channel(<CHANNEL>)

@observer.on_event(ChatEventType.TWITCHCHATMESSAGE)
def echo_handler(event):
    observer.send_message(event.message, event.channel)

observer.start()

on_command bot would be also cool to have there, once the feature appear

I will try to handle all of this at the evening, once naming issue will be discussed

PythooonUser commented 6 years ago

I think we should definetly show both ways, decorators being only quality of life improvements.

joshuaskelly commented 6 years ago

I think the Cookbook should have actual use cases that folks can directly use. We also should have one that uses decorators. 😄