Documentation
¶
Index ¶
- func GetAPIHash() string
- func GetAPIID() string
- func GetBeefWebPort() int
- func GetBotToken() string
- func GetChatID() int64
- func GetChatSelectLimit() int
- func GetChatUsername() string
- func GetPinnedMessage() int64
- func GetPlaylistID() string
- func GetPrivateChatSelectLimit() int
- func GetQueueLimit() int
- func GetRecentLimit() int
- func GetReleaseTime() int64
- func GetReqSongLimit() int
- func GetRowLimit() int
- func GetSuccessRate() float64
- func GetUpdateTime() int32
- func GetVoteTime() int32
- func GetWebPort() int
- func IsJoinNeeded() bool
- func IsPtcpsOnly() bool
- func IsVoteEnabled() bool
- func IsWebEnabled() bool
- func LoadConfig() error
- func Read()
- func Save()
- func SaveConfig()
- func SaveStatus()
- func SetChatID(value int64)
- func SetChatSelectLimit(value int)
- func SetCurrentSong(value string)
- func SetJoinEnable(value bool)
- func SetPinnedMessage(value int64)
- func SetPrivateChatSelectLimit(value int)
- func SetPtcpEnable(value bool)
- func SetQueueLimit(value int)
- func SetQueueSong(value []int)
- func SetRecentLimit(value int)
- func SetRecentSong(value []int)
- func SetReleaseTime(value int64)
- func SetReqSongLimit(value int)
- func SetRowLimit(value int)
- func SetSuccessRate(value float64)
- func SetUpdateTime(value int32)
- func SetVoteEnable(value bool)
- func SetVoteTime(value int32)
- type Config
- type Limit
- type Status
- type Vote
- type Web
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetChatSelectLimit ¶
func GetChatSelectLimit() int
GetChatSelectLimit get select limit of group chat
func GetPrivateChatSelectLimit ¶
func GetPrivateChatSelectLimit() int
GetPrivateChatSelectLimit get select limit of private chat
func GetReleaseTime ¶
func GetReleaseTime() int64
GetReleaseTime get lock the vote seconds after vote ended
func IsJoinNeeded ¶
func IsJoinNeeded() bool
IsJoinNeeded return true if only users which are in the group can vote
func IsPtcpsOnly ¶
func IsPtcpsOnly() bool
IsPtcpsOnly return true if only participants which are in a voice chat can vote
func SetChatSelectLimit ¶ added in v1.0.4
func SetChatSelectLimit(value int)
SetChatSelectLimit set select limit of group chat
func SetJoinEnable ¶ added in v1.0.4
func SetJoinEnable(value bool)
SetJoinEnable update user must join
func SetPinnedMessage ¶
func SetPinnedMessage(value int64)
SetPinnedMessage update pinned message ID
func SetPrivateChatSelectLimit ¶ added in v1.0.4
func SetPrivateChatSelectLimit(value int)
SetPrivateChatSelectLimit set select limit of private chat
func SetPtcpEnable ¶ added in v1.0.4
func SetPtcpEnable(value bool)
SetPtcpEnable update participants only
func SetQueueLimit ¶ added in v1.0.4
func SetQueueLimit(value int)
SetQueueLimit set queue song limit
func SetRecentLimit ¶ added in v1.0.4
func SetRecentLimit(value int)
SetRecentLimit set recent song limit
func SetReleaseTime ¶ added in v1.0.4
func SetReleaseTime(value int64)
SetReleaseTime set lock the vote seconds after vote ended
func SetReqSongLimit ¶ added in v1.0.4
func SetReqSongLimit(value int)
SetReqSongLimit set request song limit
func SetSuccessRate ¶ added in v1.0.4
func SetSuccessRate(value float64)
SetSuccessRate set vote success rate
func SetUpdateTime ¶ added in v1.0.2
func SetUpdateTime(value int32)
SetUpdateTime update the vote update time
func SetVoteEnable ¶ added in v1.0.4
func SetVoteEnable(value bool)
SetVoteEnable set vote on or off
Types ¶
type Config ¶
type Config struct {
ApiId string `json:"api_id"`
ApiHash string `json:"api_hash"`
BotToken string `json:"bot_token"`
ChatId int64 `json:"chat_id"`
ChatUsername string `json:"chat_username"`
PinnedMsg int64 `json:"pinned_message"`
BeefwebPort int `json:"beefweb_port"`
PlaylistId string `json:"playlist_id"`
LimitSetting Limit `json:"limit"`
VoteSetting Vote `json:"vote"`
WebSetting Web `json:"web"`
}
Config config JSON strust
type Limit ¶
type Limit struct {
ChatSelectLimit int `json:"chat_select_limit"`
PriSelectLimit int `json:"private_select_limit"`
RowLimit int `json:"row_limit"`
QueueLimit int `json:"queue_limit"`
RecentLimit int `json:"recent_limit"`
ReqSongPerMin int `json:"request_song_per_minute"`
}
Limit limit setting JSON struct
type Status ¶
type Status struct {
Current string `json:"current"`
Queue []int `json:"queue"`
Recent []int `json:"recent"`
}
Status status JSON struct
type Vote ¶
type Vote struct {
Enable bool `json:"enable"`
VoteTime int32 `json:"vote_time"`
UpdateTime int32 `json:"update_time"`
ReleaseTime int64 `json:"release_time"`
PctOfSuccess float64 `json:"percent_of_success"`
PtcpsOnly bool `json:"participants_only"`
UserMustJoin bool `json:"user_must_join"`
}
Vote vote setting JSON struct