mirror of
https://github.com/ultrasn0w/huso.git
synced 2025-12-15 19:49:53 +01:00
Big cleanup 🧹
This commit is contained in:
14
labersack.go
14
labersack.go
@@ -30,10 +30,10 @@ func SendAppointBroadcast(creator string, app *Appointment) {
|
||||
msgStart.WriteString(fmt.Sprintf("<@%d>", uData.DiscordID))
|
||||
}
|
||||
|
||||
msgs := fmt.Sprintf("🗓️ New appointment for [%s](https://anime.hanami.family/anime/%d) at\n<t:%d:F>\n<t:%d:R>", anime.Title, app.Anime, app.Time.Unix(), app.Time.Unix())
|
||||
msgs := fmt.Sprintf("🗓️ New appointment for [%s](%s%d) at\n<t:%d:F>\n<t:%d:R>", anime.Title, *husoWebAnimeUri, app.Anime, app.Time.Unix(), app.Time.Unix())
|
||||
msge := discordgo.MessageEmbed{
|
||||
Description: msgs,
|
||||
URL: fmt.Sprintf("https://anime.hanami.family/anime/%d", app.Anime),
|
||||
URL: fmt.Sprintf("%s%d", *husoWebAnimeUri, app.Anime),
|
||||
Thumbnail: &discordgo.MessageEmbedThumbnail{URL: anime.ImageLargeURL},
|
||||
Color: 7187428,
|
||||
Footer: &discordgo.MessageEmbedFooter{
|
||||
@@ -46,7 +46,7 @@ func SendAppointBroadcast(creator string, app *Appointment) {
|
||||
msge.Author = &discordgo.MessageEmbedAuthor{
|
||||
Name: user.Username,
|
||||
IconURL: user.ImageURL,
|
||||
URL: fmt.Sprintf("https://anime.hanami.family/user/%s", creator),
|
||||
URL: fmt.Sprintf("%s%s", *husoWebUserUri, creator),
|
||||
}
|
||||
}
|
||||
|
||||
@@ -54,7 +54,7 @@ func SendAppointBroadcast(creator string, app *Appointment) {
|
||||
Content: msgStart.String(),
|
||||
Embeds: []*discordgo.MessageEmbed{&msge},
|
||||
}
|
||||
_, err = discc.ChannelMessageSendComplex("998277590609559632", &msgc)
|
||||
_, err = discc.ChannelMessageSendComplex(*discordChannel, &msgc)
|
||||
|
||||
if err != nil {
|
||||
color.Errorln(err.Error())
|
||||
@@ -84,10 +84,10 @@ func AnnounceAppointmentSoon(app *Appointment) {
|
||||
msgStart.WriteString(fmt.Sprintf("<@%d>", uData.DiscordID))
|
||||
}
|
||||
|
||||
msgs := fmt.Sprintf("⏰ Appointment starting <t:%d:R>!\n[%s](https://anime.hanami.family/anime/%d) at\n<t:%d:F>", app.Time.Unix(), anime.Title, app.Anime, app.Time.Unix())
|
||||
msgs := fmt.Sprintf("⏰ Appointment starting <t:%d:R>!\n[%s](%s%d) at\n<t:%d:F>", app.Time.Unix(), anime.Title, *husoWebAnimeUri, app.Anime, app.Time.Unix())
|
||||
msge := discordgo.MessageEmbed{
|
||||
Description: msgs,
|
||||
URL: fmt.Sprintf("https://anime.hanami.family/anime/%d", app.Anime),
|
||||
URL: fmt.Sprintf("%s%d", *husoWebAnimeUri, app.Anime),
|
||||
Thumbnail: &discordgo.MessageEmbedThumbnail{URL: anime.ImageLargeURL},
|
||||
Color: 7187428,
|
||||
Footer: &discordgo.MessageEmbedFooter{
|
||||
@@ -99,7 +99,7 @@ func AnnounceAppointmentSoon(app *Appointment) {
|
||||
Content: msgStart.String(),
|
||||
Embeds: []*discordgo.MessageEmbed{&msge},
|
||||
}
|
||||
_, err = discc.ChannelMessageSendComplex("998277590609559632", &msgc)
|
||||
_, err = discc.ChannelMessageSendComplex(*discordChannel, &msgc)
|
||||
|
||||
if err != nil {
|
||||
color.Errorln(err.Error())
|
||||
|
||||
Reference in New Issue
Block a user