No database

This commit is contained in:
stratic-dev
2024-03-15 00:54:18 +00:00
parent def2bc3d2c
commit 3797438ca2
9 changed files with 94 additions and 81 deletions

View File

@@ -367,13 +367,12 @@ func (s *Server) DiscordChannelSend(charName string, content string) {
}
}
func (s *Server) DiscordScreenShotSend(charName string, title string, description string) string {
func (s *Server) DiscordScreenShotSend(charName string, title string, description string, articleToken string) {
if s.erupeConfig.Discord.Enabled && s.discordBot != nil {
message := fmt.Sprintf("**%s**: %s - %s", charName, title, description)
mesageId, _ := s.discordBot.RealtimeChannelSend(message)
return mesageId
imageUrl := fmt.Sprintf("%s:%d/api/ss/bbs/%s", s.erupeConfig.Screenshots.Host, s.erupeConfig.Screenshots.Port, articleToken)
message := fmt.Sprintf("**%s**: %s - %s %s", charName, title, description, imageUrl)
s.discordBot.RealtimeChannelSend(message)
}
return ""
}
func (s *Server) FindSessionByCharID(charID uint32) *Session {