fix: markdown parse mode breaking some plugins
This commit is contained in:
parent
35c14ce8a8
commit
0edf41c792
5 changed files with 140 additions and 6 deletions
|
@ -131,12 +131,15 @@ func (p *HLTBPlugin) OnMessage(msg *model.Message, config map[string]interface{}
|
|||
Channel: msg.Channel,
|
||||
}
|
||||
|
||||
// Set parse mode for markdown formatting
|
||||
if responseMsg.Raw == nil {
|
||||
responseMsg.Raw = make(map[string]interface{})
|
||||
}
|
||||
responseMsg.Raw["parse_mode"] = "Markdown"
|
||||
|
||||
// Add game cover as attachment if available
|
||||
if game.GameImage != "" {
|
||||
imageURL := p.getFullImageURL(game.GameImage)
|
||||
if responseMsg.Raw == nil {
|
||||
responseMsg.Raw = make(map[string]interface{})
|
||||
}
|
||||
responseMsg.Raw["image_url"] = imageURL
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue