func SendToSlackChannel(channel, username, format string, a ...interface{}) error {
	message := format
	if len(a) > 0 {
		message = fmt.Sprintf(format, a...)
	}
	if !strings.HasPrefix(channel, "#") {
		channel = "#" + channel
	}
	return sendToSlack(channel, username, message)
}
SendToSlackChannel Sends message to a specific channel.
package util
import (
	"fmt"
	"strings"
	"github.com/lbryio/lbry.go/v2/extras/errors"
	"github.com/nlopes/slack"
	log "github.com/sirupsen/logrus"
)
var defaultChannel string
var defaultUsername string
var slackApi *slack.Client
func InitSlack(token string, channel string, username string) {
	slackApi = slack.New(token)
	defaultChannel = channel
	defaultUsername = username
}
func SendToSlackUser(user, username, format string, a ...interface{}) error {
	message := format
	if len(a) > 0 {
		message = fmt.Sprintf(format, a...)
	}
	if !strings.HasPrefix(user, "@") {
		user = "@" + user
	}
	return sendToSlack(user, username, message)
}