You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

33 lines
683 B

// +build !rm_basic_commands allcommands followcmd
package main
import (
"fmt"
)
func init() {
command := Command{
Cmd: []string{"unfollow"},
Description: "$username - Unfollows the given user",
Help: "",
Exec: cmdUnfollow,
}
RegisterCommand(command)
}
func cmdUnfollow(cmd []string) {
if len(cmd) == 2 {
go unfollow(cmd[1])
} else {
printUnfollowHelp()
}
}
func unfollow(username string) {
k.Exec("unfollow", username)
printInfoF("Now unfollows $TEXT", config.Colors.Message.LinkKeybase.stylize(username))
}
func printUnfollowHelp() {
printInfo(fmt.Sprintf("To unfollow a user use %sunfollow <username>", config.Basics.CmdPrefix))
}