shrayasr / TheHexBot

A twitter bot that replies to tweets that have hex codes in them
MIT License
15 stars 18 forks source link

Bot needs to take care of the character limit #7

Open shrayasr opened 7 years ago

shrayasr commented 7 years ago

Currently, the bot composes the tweet very simplistically:

@mention @mention @mention Found '{hex}' in your tweet. Here you go:

But this model will break when there are enough mentions. TweetInvi exposes a Tweet length method which can be used to make sure that the tweet we compose is within the limit.

Considerations

BGawor commented 6 years ago

if (name.ScreenName != "thehexbot" || (mentionedNames.Length + name.ScreenName < 236))

@line 203 this should stop adding excess mentions if they'd break character limit

shrayasr commented 6 years ago

This if fixed for now via #11. I'm leaving this open to make sure that we follow through with the right implementation when upstream gives us a way to actually validate the tweet length

marknoble commented 4 years ago

@shrayasr Should the help wanted and up-for-grabs labels be removed if this issue has been closed?

shrayasr commented 4 years ago

yes @marknoble. Thanks for this, I've removed it