Documentation ¶
Index ¶
- Variables
- func BotIsRunning() bool
- 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 GetMembers(guildID int64, members ...int64) (m []*discordgo.Member, err error)
- func GetOnlineCount(guildID int64) (c int64, err 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 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 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 Plugin
- type ShardStatus
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrServerError = errors.New("reststate server is having issues")
)
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 GetMembers ¶
func GetOnlineCount ¶ added in v1.4.1
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 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 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 ShardStatus ¶
type ShardStatus struct { 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"` }
func GetShardStatuses ¶
func GetShardStatuses() (st []*ShardStatus, err error)
Click to show internal directories.
Click to hide internal directories.