joshuaskelly / twitch-observer

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

Simplify Naming Conventions #65

Closed joshuaskelly closed 6 years ago

joshuaskelly commented 6 years ago

Summary

Many of the classes and attributes have redundant info and should be simplified. e.g.

TwitchChatObserver -> Observer

Proposed Names

Classes

Current Proposed
BadTwitchChatEvent BadEvent
TwitchChatEvent Event
TwitchChatObserver Observer
TwitchChatColor Color

Chat Event Types

Current Proposed
TWITCHCHATJOIN JOIN
TWITCHCHATLEAVE LEAVE
TWITCHCHATMESSAGE MESSAGE
TWITCHCHATMODE MODE
TWITCHCHATCLEARCHAT CLEARCHAT
TWITCHCHATHOSTTARGET HOSTTARGET
TWITCHCHATNOTICE NOTICE
TWITCHCHATRECONNECT RECONNECT
TWITCHCHATROOMSTATE ROOMSTATE
TWITCHCHATUSERNOTICE USERNOTICE
TWITCHCHATUSERSTATE USERSTATE
TWITCHCHATWHISPER WHISPER
TWITCHCHATCOMMAND COMMAND
joshuaskelly commented 6 years ago

If I missed any names or if there is a better naming scheme, let me know.

PythooonUser commented 6 years ago

Question: What about the strings of the ChatEventTypes? Do they stay the same?

Question: Am I right that the aliases defined in the __init__.py file aren't required any more?

joshuaskelly commented 6 years ago

What about the strings of the ChatEventTypes? Do they stay the same?

I think we should change those? Since we are already making big breaking changes.

Am I right that the aliases defined in the init.py file aren't required any more?

I'd say yes, we can remove those.

PythooonUser commented 6 years ago

I think we should change those?

What about naming conflicts with e.g. tdl, pygame or custom event types?

joshuaskelly commented 6 years ago

Good point. Maybe we can wait before changing those? I'm not quite sure yet how I feel about that change.

PythooonUser commented 6 years ago

I'm not quite sure yet how I feel about that change.

About the whole change? Please, speak up if you have any concerns!

PythooonUser commented 6 years ago

Anyways, I'm willing to work on this issue.

joshuaskelly commented 6 years ago

Go for it! 😄