TheHexBot icon indicating copy to clipboard operation
TheHexBot copied to clipboard

Bot needs to take care of the character limit

Open shrayasr opened this issue 8 years ago • 4 comments

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

  • TweetInvi doesn't support 280 chars yet (https://github.com/linvi/tweetinvi/issues/594)
  • What do we do when the length exceeds 280 characters?

shrayasr avatar Nov 13 '17 13:11 shrayasr

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

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

BGawor avatar Dec 05 '17 16:12 BGawor

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

shrayasr avatar Dec 06 '17 10:12 shrayasr

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

marknoble avatar Nov 08 '20 01:11 marknoble

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

shrayasr avatar Nov 08 '20 05:11 shrayasr