Browse Source

Merge pull request #694 from BigHeadGeorge/fix-tts-casing

Fix inconsistent TTS casing
Carson Hoffman 5 years ago
parent
commit
afe392e6c1
3 changed files with 4 additions and 4 deletions
  1. 2 2
      message.go
  2. 1 1
      restapi.go
  3. 1 1
      structs.go

+ 2 - 2
message.go

@@ -63,7 +63,7 @@ type Message struct {
 	MentionRoles []string `json:"mention_roles"`
 
 	// Whether the message is text-to-speech.
-	Tts bool `json:"tts"`
+	TTS bool `json:"tts"`
 
 	// Whether the message mentions everyone.
 	MentionEveryone bool `json:"mention_everyone"`
@@ -131,7 +131,7 @@ type File struct {
 type MessageSend struct {
 	Content string        `json:"content,omitempty"`
 	Embed   *MessageEmbed `json:"embed,omitempty"`
-	Tts     bool          `json:"tts"`
+	TTS     bool          `json:"tts"`
 	Files   []*File       `json:"-"`
 
 	// TODO: Remove this when compatibility is not required.

+ 1 - 1
restapi.go

@@ -1585,7 +1585,7 @@ func (s *Session) ChannelMessageSendComplex(channelID string, data *MessageSend)
 func (s *Session) ChannelMessageSendTTS(channelID string, content string) (*Message, error) {
 	return s.ChannelMessageSendComplex(channelID, &MessageSend{
 		Content: content,
-		Tts:     true,
+		TTS:     true,
 	})
 }
 

+ 1 - 1
structs.go

@@ -687,7 +687,7 @@ type Settings struct {
 	RenderEmbeds           bool               `json:"render_embeds"`
 	InlineEmbedMedia       bool               `json:"inline_embed_media"`
 	InlineAttachmentMedia  bool               `json:"inline_attachment_media"`
-	EnableTtsCommand       bool               `json:"enable_tts_command"`
+	EnableTTSCommand       bool               `json:"enable_tts_command"`
 	MessageDisplayCompact  bool               `json:"message_display_compact"`
 	ShowCurrentGame        bool               `json:"show_current_game"`
 	ConvertEmoticons       bool               `json:"convert_emoticons"`