TheHexBot
TheHexBot copied to clipboard
Bot needs to take care of the character limit
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?
if (name.ScreenName != "thehexbot" || (mentionedNames.Length + name.ScreenName < 236))
@line 203 this should stop adding excess mentions if they'd break character limit
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 Should the help wanted and up-for-grabs labels be removed if this issue has been closed?
yes @marknoble. Thanks for this, I've removed it