Documentation ¶
Index ¶
- Variables
- func BotIsRunning() bool
- func Get(shard int, url string, dest interface{}) error
- func GetBotMember(guildID int64) (m *discordgo.Member, err error)
- func GetChannelPermissions(guildID, channelID int64) (perms int64, err error)
- func GetGuild(guildID int64) (g *discordgo.Guild, err error)
- func GetMemberColors(guildID int64, members ...int64) (m map[string]int, err error)
- func GetMembers(guildID int64, members ...int64) (m []*discordgo.Member, err error)
- func GetOnlineCount(guildID int64) (c int64, err error)
- func GetServerAddrForGuild(guildID int64) string
- func GetServerAddrForShard(shard int) string
- func GetWithAddress(addr string, url string, dest interface{}) error
- func HandleBotMember(w http.ResponseWriter, r *http.Request)
- func HandleChannelPermissions(w http.ResponseWriter, r *http.Request)
- func HandleGWStatus(w http.ResponseWriter, r *http.Request)
- func HandleGetMemberColors(w http.ResponseWriter, r *http.Request)
- func HandleGetMembers(w http.ResponseWriter, r *http.Request)
- func HandleGetOnlineCount(w http.ResponseWriter, r *http.Request)
- func HandleGuild(w http.ResponseWriter, r *http.Request)
- func HandlePing(w http.ResponseWriter, r *http.Request)
- func HandleReconnectShard(w http.ResponseWriter, r *http.Request)
- func Post(shard int, url string, bodyData interface{}, dest interface{}) error
- func RedisKeyNodeAddressMapping(nodeID string) string
- func RedisKeyShardAddressMapping(shardID int) string
- func RegisterPlugin()
- func RestartAll(reidentify bool)
- func RunPinger()
- func SendReconnectAll(reidentify bool) (err error)
- func SendReconnectShard(shardID int, reidentify bool) (err error)
- func ServeJson(w http.ResponseWriter, r *http.Request, data interface{})
- func ServerError(w http.ResponseWriter, r *http.Request, err error) bool
- type BotRestPlugin
- type NodeStatus
- type Plugin
- type ShardStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrServerError = errors.New("botrest server is having issues") ErrCantFindServer = errors.New("can't find botrest server for provided shard") )
Functions ¶
func BotIsRunning ¶
func BotIsRunning() bool
Returns wether the bot is running or not, (time since last sucessfull ping was less than 5 seconds)
func GetChannelPermissions ¶
func GetMemberColors ¶ added in v1.6.0
func GetMembers ¶
func GetOnlineCount ¶ added in v1.4.1
func GetServerAddrForGuild ¶ added in v1.11.0
func GetServerAddrForShard ¶ added in v1.11.0
func GetWithAddress ¶ added in v1.11.0
func HandleBotMember ¶
func HandleBotMember(w http.ResponseWriter, r *http.Request)
func HandleChannelPermissions ¶
func HandleChannelPermissions(w http.ResponseWriter, r *http.Request)
func HandleGWStatus ¶
func HandleGWStatus(w http.ResponseWriter, r *http.Request)
func HandleGetMemberColors ¶ added in v1.6.0
func HandleGetMemberColors(w http.ResponseWriter, r *http.Request)
func HandleGetMembers ¶
func HandleGetMembers(w http.ResponseWriter, r *http.Request)
func HandleGetOnlineCount ¶ added in v1.4.1
func HandleGetOnlineCount(w http.ResponseWriter, r *http.Request)
func HandleGuild ¶
func HandleGuild(w http.ResponseWriter, r *http.Request)
func HandlePing ¶
func HandlePing(w http.ResponseWriter, r *http.Request)
func HandleReconnectShard ¶
func HandleReconnectShard(w http.ResponseWriter, r *http.Request)
func RedisKeyNodeAddressMapping ¶ added in v1.11.0
func RedisKeyShardAddressMapping ¶ added in v1.11.0
func RegisterPlugin ¶ added in v1.4.1
func RegisterPlugin()
func RestartAll ¶ added in v1.4.1
func RestartAll(reidentify bool)
func SendReconnectAll ¶ added in v1.4.1
func SendReconnectShard ¶
func ServerError ¶
Returns true if an error occured
Types ¶
type BotRestPlugin ¶ added in v1.6.0
type BotRestPlugin interface {
InitBotRestServer(mux *goji.Mux)
}
type NodeStatus ¶ added in v1.11.0
type NodeStatus struct { ID string Shards []*ShardStatus `json:"shards"` }
func GetNodeStatuses ¶ added in v1.11.0
func GetNodeStatuses() (st []*NodeStatus, err error)
type ShardStatus ¶
type ShardStatus struct { ShardID int `json:"shard_id"` TotalEvents int64 `json:"total_events"` EventsPerSecond float64 `json:"events_per_second"` ConnStatus discordgo.GatewayStatus `json:"conn_status"` LastHeartbeatSend time.Time `json:"last_heartbeat_send"` LastHeartbeatAck time.Time `json:"last_heartbeat_ack"` }
Click to show internal directories.
Click to hide internal directories.