CactusDev / CactusBot

An open source, community-written service-agnostic chat bot
MIT License
30 stars 6 forks source link

Fix tag segment containing multiple @'s #200

Closed Innectic closed 7 years ago

Innectic commented 7 years ago

Fixes #194

2Cubed commented 7 years ago

@Innectic The '@' + is necessary; I think we should instead be using component.data, though, which only contains the username.

Think about something that was added from Discord and is being recalled from Beam, for example, where the text is @Innectic#1234. We want to send '@' + "Innectic" (data) to Beam, not @Innectic#1234 (text).

2Cubed commented 7 years ago

That's the reason why Travis is failing, by the way - @Stanley parses to "data": "Stanley" and "text": "@Stanley", like it should. It should get the @ added to the data. :slightly_smiling_face: