capitalize ID in field names
This commit is contained in:
parent
df9faa9479
commit
67473202d5
2 changed files with 5 additions and 6 deletions
5
bot.go
5
bot.go
|
@ -126,7 +126,7 @@ type BeatmapsetDownloaded struct {
|
|||
}
|
||||
|
||||
func (bot *Bot) downloadBeatmap(beatmapSet *Beatmapset) (downloadedBeatmap BeatmapsetDownloaded, err error) {
|
||||
beatmapFile, err := bot.api.BeatmapsetDownload(beatmapSet.Id)
|
||||
beatmapFile, err := bot.api.BeatmapsetDownload(beatmapSet.ID)
|
||||
if err != nil {
|
||||
return
|
||||
}
|
||||
|
@ -180,7 +180,7 @@ func (bot *Bot) newMessageHandler(s *discordgo.Session, m *discordgo.MessageCrea
|
|||
if err != nil {
|
||||
return
|
||||
}
|
||||
mapperId := mapper.Id
|
||||
mapperId := mapper.ID
|
||||
|
||||
err = bot.db.ChannelTrackMapper(m.ChannelID, mapperId, 3)
|
||||
if err != nil {
|
||||
|
@ -192,7 +192,6 @@ func (bot *Bot) newMessageHandler(s *discordgo.Session, m *discordgo.MessageCrea
|
|||
bot.requests <- mapperId
|
||||
}()
|
||||
|
||||
bot.MessageReactionAdd(m.ChannelID, m.ID, "\xf0\x9f\x91\x8d")
|
||||
bot.ChannelMessageSend(m.ChannelID, fmt.Sprintf("subscribed to %+v", mapper))
|
||||
}
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
package main
|
||||
|
||||
type User struct {
|
||||
Id int `json:"id"`
|
||||
ID int `json:"id"`
|
||||
Username string `json:"username"`
|
||||
CountryCode string `json:"country_code"`
|
||||
}
|
||||
|
||||
type Beatmapset struct {
|
||||
Id int `json:"id"`
|
||||
ID int `json:"id"`
|
||||
|
||||
Artist string `json:"artist"`
|
||||
ArtistUnicode string `json:"artist_unicode"`
|
||||
|
@ -21,7 +21,7 @@ type Beatmapset struct {
|
|||
}
|
||||
|
||||
type Beatmap struct {
|
||||
Id int `json:"id"`
|
||||
ID int `json:"id"`
|
||||
DifficultyRating float64 `json:"difficulty_rating"`
|
||||
DifficultyName string `json:"version"`
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue