arnaucube
arnaucube/flock-botnetPublic Self-hosted repository
flock-botnet/optionManualTweetFromFlock.go
optionManualTweetFromFlock.goRaw
 1package main
 2
 3import (
 4	"bufio"
 5	"fmt"
 6	"os"
 7	"strings"
 8)
 9
10func optionManualTweetFromFlock(flock Flock) {
11
12	fmt.Print("entry tweet content: ")
13	newcommand := bufio.NewReader(os.Stdin)
14	text, _ := newcommand.ReadString('\n')
15	text = strings.TrimSpace(text)
16	fmt.Print("tweet content: ")
17	c.Purple(text)
18
19	c.Red("Are you sure? [y/n]")
20	newcommand = bufio.NewReader(os.Stdin)
21	answer, _ := newcommand.ReadString('\n')
22	answer = strings.TrimSpace(answer)
23	switch answer {
24	case "y":
25		fmt.Println("ok, you are sure")
26		tweetFromFlock(flock, text)
27		break
28	default:
29		fmt.Println("Operation cancelled")
30		break
31	}
32}