From 4c7683c65ce928c5a3da319dd64d3ee2fee80b4f Mon Sep 17 00:00:00 2001 From: Michael Zhang Date: Wed, 14 Oct 2020 16:55:00 -0500 Subject: [PATCH] bot links to the page on the web server rather than osu --- discord/bot.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/discord/bot.go b/discord/bot.go index b1202d1..4221578 100644 --- a/discord/bot.go +++ b/discord/bot.go @@ -152,7 +152,7 @@ func (bot *Bot) NotifyNewBeatmap(channels []string, newMaps []osuapi.Beatmapset) }, ) if err != nil { - err = fmt.Errorf("couldn't create commit for %s: %w", beatmapSet.ID, err) + err = fmt.Errorf("couldn't create commit for %d: %w", beatmapSet.ID, err) return } @@ -177,7 +177,7 @@ func (bot *Bot) NotifyNewBeatmap(channels []string, newMaps []osuapi.Beatmapset) } embed := &discordgo.MessageEmbed{ - URL: fmt.Sprintf("https://osu.ppy.sh/s/%d", beatmapSet.ID), + URL: fmt.Sprintf("%s/map/%d/%d", bot.config.Web.ServedAt, beatmapSet.UserID, beatmapSet.ID), Title: fmt.Sprintf("Update: %s - %s", beatmapSet.Artist, beatmapSet.Title), Timestamp: eventTime.Format(time.RFC3339), Author: &discordgo.MessageEmbedAuthor{