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 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 HandleGuild(w http.ResponseWriter, r *http.Request)
- func HandlePing(w http.ResponseWriter, r *http.Request)
- func HandleReconnectShard(w http.ResponseWriter, r *http.Request)
- func RunPinger()
- func SendReconnectShard(shardID int) (err error)
- func ServeJson(w http.ResponseWriter, r *http.Request, data interface{})
- func ServerError(w http.ResponseWriter, r *http.Request, err error) bool
- func StartServer()
- 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 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 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 SendReconnectShard ¶
func ServerError ¶
Returns true if an error occured
func StartServer ¶
func StartServer()
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.