@@ -17,7 +17,9 @@ namespace Beef.TwitchManager {
17
17
public class TwitchPollingService : PollingService {
18
18
private const String TwitchNameVariable = "{TwitchName}" ;
19
19
private const String StreamLinkVariable = "{StreamLink}" ;
20
- private const String DefaultGoLiveMessage = "Hey everyone, " + TwitchNameVariable + " is live on Twitch!\n \n " + StreamLinkVariable ;
20
+ private const String GameVariable = "{Game}" ;
21
+ private const String StreamTitleVariable = "{StreamTitle}" ;
22
+ private const String DefaultGoLiveMessage = "Hey everyone, " + TwitchNameVariable + " is live on Twitch!\n \n **{StreamTitle}**\n {Game}\n " + StreamLinkVariable ;
21
23
private const String TwitchStreamPrefix = "https://www.twitch.tv/" ;
22
24
23
25
private Dictionary < String , StreamInfo > _monitoredStreams ; // Maps Twitch Stream Name to StreamInfo
@@ -123,7 +125,9 @@ protected void UpdateLiveStatus(StreamInfo stream, String accessToken) {
123
125
// Fill in the variables for the go live message
124
126
String goLiveMessage = stream . GoLiveMessage
125
127
. Replace ( TwitchNameVariable , name )
126
- . Replace ( StreamLinkVariable , stream . StreamUrl ) ;
128
+ . Replace ( StreamLinkVariable , stream . StreamUrl )
129
+ . Replace ( GameVariable , entry . game_name )
130
+ . Replace ( StreamTitleVariable , entry . title ) ;
127
131
_twitchLiveListener . OnTwitchStreamLive ( stream . GetTwitchUsername ( ) , goLiveMessage ) ;
128
132
}
129
133
}
0 commit comments