Foppe Hemminga 6 年 前
コミット
355b332b6f
1 ファイル変更5 行追加1 行削除
  1. 5 1
      main.go

+ 5 - 1
main.go

@@ -86,7 +86,10 @@ func main() {
 			fmt.Println(faction.name + ": " + strconv.Itoa(code))
 			if code == 204 {
 				// Assuming sent
-				setBroadcastTrue(e.id)
+				err = setBroadcastTrue(e.id)
+				if err != nil {
+					log.Fatal(err)
+				}
 			}
 		}
 
@@ -212,6 +215,7 @@ func broadcastSingleAttack(attack Attack, faction Faction) error {
 			log.Println("Database error:", err)
 		}
 		news := replaceLinks(attack.news)
+		fmt.Println("Links replaced", news)
 		news = strings.Replace(news, "http:", "https:", -1)
 		for _, val := range members {
 			news = strings.Replace(news, val, "**"+val+"**", -1)