Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- type User struct {
- Set struct {
- LogoDisplay string `json:"logodisplay"`
- Stabilizer int `json:"stabilizer"`
- } `json:"Setinfo"`
- }
- var(LogoDisplay string = "ηιяαηαм™")
- func InsLogoDisplay() bool {if data.Set.LogoDisplay == "" {data.Set.LogoDisplay = LogoDisplay;return true};return false}
- //====== [cmd] ======//
- } else if txt == "sets" {
- if getAccess(ctime,cl.Mid) {
- ret := "╭━ • 𝐒𝐞𝐭𝐭𝐢𝐧𝐠𝐬 • ━╮"
- if data.Set.KillMod {ret += "\n┃•🟢 Killmode"} else {ret += "\n┃•🔴 Killmode"}
- if data.Set.Stabilizer == 1 {ret += "\n┃•🟢 Stabilizer"} else {ret += "\n┃•🔴 Stabilizer"}
- ret += "\n┃•stabilizer ❨on/off❩"
- cl.SendMessage(to, ret)
- }
- } else if strings.HasPrefix(txt,"setlogodis"+":") {
- if getAccess(ctime,cl.Mid) {
- result := strings.Split((text),":")
- data.Set.LogoDisplay = result[1]
- cl.SendMessage(to, "LogoDisplay set to: " + data.Set.LogoDisplay)
- }
- } else if strings.HasPrefix(txt,"stabilizer"+" ") {
- if getAccess(ctime,cl.Mid) {
- result := strings.Split((text), " ")
- putSquad(cl, to)
- if result[1] == "on" {
- data.Set.Stabilizer = 1
- InsLogoDisplay()
- cl.SendMessage(to, "Stabilizer enable")
- } else if result[1] == "off" {
- data.Set.Stabilizer = 0
- cl.SendMessage(to, "Stabilizer disable")
- }
- SaveData()
- }
- //====== [func ]======//
- func TimeDisplayName(cl *oop.Account) string {
- loc, _ := time.LoadLocation("Asia/Bangkok")
- ab:=time.Now().In(loc)
- hh := ab.Hour();mm := ab.Minute()
- var (hhconv string;mmconv string)
- if hh < 10 {hhconv = "0"+strconv.Itoa(hh)} else {hhconv = strconv.Itoa(hh)}
- if mm < 10 {mmconv = "0"+strconv.Itoa(mm)} else {mmconv = strconv.Itoa(mm)}
- ret := "("+hhconv+":"+mmconv+")"
- return ret
- }
- func speedStabilizer(cl *oop.Account) {
- for {
- elapsed := time.Since(timeStart)
- fmt.Println(""+botDuration(elapsed)+"")
- if data.Set.Stabilizer == 1 {
- <-time.After(6 * time.Minute)
- Td := TimeDisplayName(cl)
- num := fmt.Sprintf("°%v", cl.Count+1)
- Upname := fmt.Sprintf("%s%s%s", data.Set.LogoDisplay, num, Td)
- name,_ := cl.GetProfile()
- name.DisplayName = Upname
- cl.UpdateProfileAttributes(2, name.DisplayName)
- } else {
- <-time.After(380 * time.Second)
- fth,_ := cl.GetProfile()
- fth.DisplayName = fth.DisplayName
- cl.UpdateProfile(fth.DisplayName,fth.DisplayName)
- }
- }
- }
- for num, auth := range Token {
- xcl := oop.Connect(num, auth)
- err := xcl.LoginWithAuthToken()
- if err == nil {
- go speedStabilizer(xcl)
- go func(num int){perBots(xcl)}(num)
Add Comment
Please, Sign In to add comment