Documentation
¶
Index ¶
- Variables
- func CheckBili(Group database.Group, Member database.Member, wg *sync.WaitGroup)
- func CheckLiveSchedule()
- func GetRoomStatus(RoomID int) (getInfoByRoom, error)
- func Start(BotInit *discordgo.Session, cronInit *cron.Cron)
- type Avatar
- type BiliBiliSchedule
- type Bilibili
- type Card
- type LiveBili
- func (Data *LiveBili) AddData(new *database.LiveBiliDB) *LiveBili
- func (Data *LiveBili) Crotttt(GroupIcon string) error
- func (Data *LiveBili) SetMember(new database.Member) *LiveBili
- func (Data *LiveBili) SetStatus(new string) *LiveBili
- func (Data *LiveBili) UpdateOnline(new int) *LiveBili
- func (Data *LiveBili) UpdateSchdule(new time.Time) *LiveBili
- type NewSchedule
- type ProgramList
- type RoomID
- type RoomID2
- type ScheduleData
- type TimeLine
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
View Source
var (
Bot *discordgo.Session
)
Functions ¶
func CheckLiveSchedule ¶
func CheckLiveSchedule()
func GetRoomStatus ¶
Types ¶
type Avatar ¶
type Avatar struct {
Code int `json:"code"`
Message string `json:"message"`
TTL int `json:"ttl"`
Data struct {
Mid int `json:"mid"`
Name string `json:"name"`
Sex string `json:"sex"`
Face string `json:"face"`
Sign string `json:"sign"`
Rank int `json:"rank"`
Level int `json:"level"`
Jointime int `json:"jointime"`
Moral int `json:"moral"`
Silence int `json:"silence"`
Birthday string `json:"birthday"`
Coins int `json:"coins"`
FansBadge bool `json:"fans_badge"`
Official struct {
Role int `json:"role"`
Title string `json:"title"`
Desc string `json:"desc"`
Type int `json:"type"`
} `json:"official"`
Vip struct {
Type int `json:"type"`
Status int `json:"status"`
ThemeType int `json:"theme_type"`
Label struct {
Path string `json:"path"`
Text string `json:"text"`
LabelTheme string `json:"label_theme"`
} `json:"label"`
AvatarSubscript int `json:"avatar_subscript"`
NicknameColor string `json:"nickname_color"`
} `json:"vip"`
Pendant struct {
Pid int `json:"pid"`
Name string `json:"name"`
Image string `json:"image"`
Expire int `json:"expire"`
ImageEnhance string `json:"image_enhance"`
} `json:"pendant"`
Nameplate struct {
Nid int `json:"nid"`
Name string `json:"name"`
Image string `json:"image"`
ImageSmall string `json:"image_small"`
Level string `json:"level"`
Condition string `json:"condition"`
} `json:"nameplate"`
IsFollowed bool `json:"is_followed"`
TopPhoto string `json:"top_photo"`
Theme struct {
} `json:"theme"`
SysNotice struct {
} `json:"sys_notice"`
} `json:"data"`
}
type BiliBiliSchedule ¶
type BiliBiliSchedule struct {
Code int `json:"code"`
Message string `json:"message"`
TTL int `json:"ttl"`
Data struct {
UserInfos interface{} `json:"user_infos"`
ProgramInfos interface{} `json:"program_infos"`
Timestamp int `json:"timestamp"`
AnchorNotInWhiteList int `json:"anchor_not_in_white_list"`
GlobalSwitchClose int `json:"global_switch_close"`
} `json:"data"`
}
type Bilibili ¶
type Bilibili struct {
Code int `json:"code"`
Message string `json:"message"`
TTL int `json:"ttl"`
Data struct {
List struct {
Tlist struct {
Num1 struct {
Tid int `json:"tid"`
Count int `json:"count"`
Name string `json:"name"`
} `json:"1"`
Num3 struct {
Tid int `json:"tid"`
Count int `json:"count"`
Name string `json:"name"`
} `json:"3"`
Num4 struct {
Tid int `json:"tid"`
Count int `json:"count"`
Name string `json:"name"`
} `json:"4"`
} `json:"tlist"`
Vlist []struct {
Comment int `json:"comment"`
Typeid int `json:"typeid"`
Play int `json:"play"`
Pic string `json:"pic"`
Subtitle string `json:"subtitle"`
Description string `json:"description"`
Copyright string `json:"copyright"`
Title string `json:"title"`
Review int `json:"review"`
Author string `json:"author"`
Mid int `json:"mid"`
Created int `json:"created"`
Length string `json:"length"`
VideoReview int `json:"video_review"`
Aid int `json:"aid"`
Bvid string `json:"bvid"`
HideClick bool `json:"hide_click"`
IsPay int `json:"is_pay"`
IsUnionVideo int `json:"is_union_video"`
} `json:"vlist"`
} `json:"list"`
Page struct {
Count int `json:" count"`
Pn int `json:"pn"`
Ps int `json:"ps"`
} `json:"page"`
} `json:"data"`
}
type Card ¶
type Card struct {
Item struct {
ID int `json:"id"`
Title string `json:"title"`
Description string `json:"description"`
Category string `json:"category"`
Role []interface{} `json:"role"`
Source []interface{} `json:"source"`
Pictures []struct {
ImgSrc string `json:"img_src"`
ImgWidth int `json:"img_width"`
ImgHeight int `json:"img_height"`
ImgSize int `json:"img_size"`
} `json:"pictures"`
PicturesCount int `json:"pictures_count"`
UploadTime int `json:"upload_time"`
AtControl string `json:"at_control"`
Reply int `json:"reply"`
Settings struct {
CopyForbidden int `json:"copy_forbidden"`
} `json:"settings"`
IsFav int `json:"is_fav"`
} `json:"item"`
User struct {
UID int `json:"uid"`
HeadURL string `json:"head_url"`
Name string `json:"name"`
Vip struct {
VipType int `json:"vipType"`
VipDueDate int64 `json:"vipDueDate"`
DueRemark string `json:"dueRemark"`
AccessStatus int `json:"accessStatus"`
VipStatus int `json:"vipStatus"`
VipStatusWarn string `json:"vipStatusWarn"`
ThemeType int `json:"themeType"`
Label struct {
Path string `json:"path"`
} `json:"label"`
} `json:"vip"`
} `json:"user"`
}
type LiveBili ¶
type LiveBili struct {
RoomData *database.LiveBiliDB
Member database.Member
Embed *discordgo.MessageEmbed
}
func (*LiveBili) UpdateOnline ¶
type NewSchedule ¶
type ProgramList ¶
type ProgramList struct {
Ruid int `json:"ruid"`
IsSubscription int `json:"is_subscription"`
StartTime int `json:"start_time"`
IsRecommend int `json:"is_recommend"`
SubscriptionID int `json:"subscription_id"`
Title string `json:"title"`
ProgramID int `json:"program_id"`
Expired int `json:"expired"`
RoomID int `json:"room_id"`
}
type RoomID ¶
type RoomID struct {
Code int `json:"code"`
Message string `json:"message"`
TTL int `json:"ttl"`
Data struct {
RoomStatus int `json:"roomStatus"`
RoundStatus int `json:"roundStatus"`
LiveStatus int `json:"liveStatus"`
URL string `json:"url"`
Title string `json:"title"`
Cover string `json:"cover"`
Online int `json:"online"`
Roomid int `json:"roomid"`
BroadcastType int `json:"broadcast_type"`
OnlineHidden int `json:"online_hidden"`
} `json:"data"`
}
type RoomID2 ¶
type RoomID2 struct {
Code int `json:"code"`
Message string `json:"message"`
TTL int `json:"ttl"`
Data struct {
RoomStatus int `json:"roomStatus"`
RoundStatus int `json:"roundStatus"`
LiveStatus int `json:"liveStatus"`
URL string `json:"url"`
Title string `json:"title"`
Cover string `json:"cover"`
Online int `json:"online"`
Roomid int `json:"roomid"`
BroadcastType int `json:"broadcast_type"`
OnlineHidden int `json:"online_hidden"`
} `json:"data"`
}
type ScheduleData ¶
type ScheduleData struct {
User []UserInfo
List []ProgramList
}
type TimeLine ¶
type TimeLine struct {
Code int `json:"code"`
Msg string `json:"msg"`
Message string `json:"message"`
Data struct {
HasMore int `json:"has_more"`
Cards []struct {
Desc struct {
UID int `json:"uid"`
Type int `json:"type"`
Rid int `json:"rid"`
ACL int `json:"acl"`
View int `json:"view"`
Repost int `json:"repost"`
Like int `json:"like"`
IsLiked int `json:"is_liked"`
DynamicID int64 `json:"dynamic_id"`
Timestamp int `json:"timestamp"`
PreDyID int `json:"pre_dy_id"`
OrigDyID int `json:"orig_dy_id"`
OrigType int `json:"orig_type"`
UserProfile struct {
Info struct {
UID int `json:"uid"`
Uname string `json:"uname"`
Face string `json:"face"`
} `json:"info"`
Card struct {
OfficialVerify struct {
Type int `json:"type"`
Desc string `json:"desc"`
} `json:"official_verify"`
} `json:"card"`
Vip struct {
VipType int `json:"vipType"`
VipDueDate int64 `json:"vipDueDate"`
DueRemark string `json:"dueRemark"`
AccessStatus int `json:"accessStatus"`
VipStatus int `json:"vipStatus"`
VipStatusWarn string `json:"vipStatusWarn"`
ThemeType int `json:"themeType"`
Label struct {
Path string `json:"path"`
} `json:"label"`
} `json:"vip"`
Pendant struct {
Pid int `json:"pid"`
Name string `json:"name"`
Image string `json:"image"`
Expire int `json:"expire"`
ImageEnhance string `json:"image_enhance"`
} `json:"pendant"`
Rank string `json:"rank"`
Sign string `json:"sign"`
LevelInfo struct {
CurrentLevel int `json:"current_level"`
CurrentMin int `json:"current_min"`
CurrentExp int `json:"current_exp"`
NextExp string `json:"next_exp"`
} `json:"level_info"`
} `json:"user_profile"`
UIDType int `json:"uid_type"`
Stype int `json:"stype"`
RType int `json:"r_type"`
InnerID int `json:"inner_id"`
Status int `json:"status"`
DynamicIDStr string `json:"dynamic_id_str"`
PreDyIDStr string `json:"pre_dy_id_str"`
OrigDyIDStr string `json:"orig_dy_id_str"`
RidStr string `json:"rid_str"`
} `json:"desc,omitempty"`
Card string `json:"card"`
ExtendJSON string `json:"extend_json"`
Extra struct {
IsSpaceTop int `json:"is_space_top"`
} `json:"extra"`
Display struct {
EmojiInfo struct {
EmojiDetails []struct {
EmojiName string `json:"emoji_name"`
ID int `json:"id"`
PackageID int `json:"package_id"`
State int `json:"state"`
Type int `json:"type"`
Attr int `json:"attr"`
Text string `json:"text"`
URL string `json:"url"`
Meta struct {
Size int `json:"size"`
} `json:"meta"`
Mtime int `json:"mtime"`
} `json:"emoji_details"`
} `json:"emoji_info"`
Relation struct {
Status int `json:"status"`
IsFollow int `json:"is_follow"`
IsFollowed int `json:"is_followed"`
} `json:"relation"`
} `json:"display,omitempty"`
Desc1 struct {
UID int `json:"uid"`
Type int `json:"type"`
Rid int `json:"rid"`
ACL int `json:"acl"`
View int `json:"view"`
Repost int `json:"repost"`
Like int `json:"like"`
IsLiked int `json:"is_liked"`
DynamicID int64 `json:"dynamic_id"`
Timestamp int `json:"timestamp"`
PreDyID int `json:"pre_dy_id"`
OrigDyID int `json:"orig_dy_id"`
OrigType int `json:"orig_type"`
UserProfile struct {
Info struct {
UID int `json:"uid"`
Uname string `json:"uname"`
Face string `json:"face"`
} `json:"info"`
Card struct {
OfficialVerify struct {
Type int `json:"type"`
Desc string `json:"desc"`
} `json:"official_verify"`
} `json:"card"`
Vip struct {
VipType int `json:"vipType"`
VipDueDate int64 `json:"vipDueDate"`
DueRemark string `json:"dueRemark"`
AccessStatus int `json:"accessStatus"`
VipStatus int `json:"vipStatus"`
VipStatusWarn string `json:"vipStatusWarn"`
ThemeType int `json:"themeType"`
Label struct {
Path string `json:"path"`
} `json:"label"`
} `json:"vip"`
Pendant struct {
Pid int `json:"pid"`
Name string `json:"name"`
Image string `json:"image"`
Expire int `json:"expire"`
ImageEnhance string `json:"image_enhance"`
} `json:"pendant"`
Rank string `json:"rank"`
Sign string `json:"sign"`
LevelInfo struct {
CurrentLevel int `json:"current_level"`
CurrentMin int `json:"current_min"`
CurrentExp int `json:"current_exp"`
NextExp string `json:"next_exp"`
} `json:"level_info"`
} `json:"user_profile"`
UIDType int `json:"uid_type"`
Stype int `json:"stype"`
RType int `json:"r_type"`
InnerID int `json:"inner_id"`
Status int `json:"status"`
DynamicIDStr string `json:"dynamic_id_str"`
PreDyIDStr string `json:"pre_dy_id_str"`
OrigDyIDStr string `json:"orig_dy_id_str"`
RidStr string `json:"rid_str"`
Bvid string `json:"bvid"`
} `json:"desc,omitempty"`
Display1 struct {
TopicInfo struct {
TopicDetails []struct {
TopicID int `json:"topic_id"`
TopicName string `json:"topic_name"`
IsActivity int `json:"is_activity"`
TopicLink string `json:"topic_link"`
} `json:"topic_details"`
} `json:"topic_info"`
UsrActionTxt string `json:"usr_action_txt"`
Relation struct {
Status int `json:"status"`
IsFollow int `json:"is_follow"`
IsFollowed int `json:"is_followed"`
} `json:"relation"`
} `json:"display,omitempty"`
Desc2 struct {
UID int `json:"uid"`
Type int `json:"type"`
Rid int `json:"rid"`
ACL int `json:"acl"`
View int `json:"view"`
Repost int `json:"repost"`
Like int `json:"like"`
IsLiked int `json:"is_liked"`
DynamicID int64 `json:"dynamic_id"`
Timestamp int `json:"timestamp"`
PreDyID int `json:"pre_dy_id"`
OrigDyID int `json:"orig_dy_id"`
OrigType int `json:"orig_type"`
UserProfile struct {
Info struct {
UID int `json:"uid"`
Uname string `json:"uname"`
Face string `json:"face"`
} `json:"info"`
Card struct {
OfficialVerify struct {
Type int `json:"type"`
Desc string `json:"desc"`
} `json:"official_verify"`
} `json:"card"`
Vip struct {
VipType int `json:"vipType"`
VipDueDate int64 `json:"vipDueDate"`
DueRemark string `json:"dueRemark"`
AccessStatus int `json:"accessStatus"`
VipStatus int `json:"vipStatus"`
VipStatusWarn string `json:"vipStatusWarn"`
ThemeType int `json:"themeType"`
Label struct {
Path string `json:"path"`
} `json:"label"`
} `json:"vip"`
Pendant struct {
Pid int `json:"pid"`
Name string `json:"name"`
Image string `json:"image"`
Expire int `json:"expire"`
ImageEnhance string `json:"image_enhance"`
} `json:"pendant"`
Rank string `json:"rank"`
Sign string `json:"sign"`
LevelInfo struct {
CurrentLevel int `json:"current_level"`
CurrentMin int `json:"current_min"`
CurrentExp int `json:"current_exp"`
NextExp string `json:"next_exp"`
} `json:"level_info"`
} `json:"user_profile"`
UIDType int `json:"uid_type"`
Stype int `json:"stype"`
RType int `json:"r_type"`
InnerID int `json:"inner_id"`
Status int `json:"status"`
DynamicIDStr string `json:"dynamic_id_str"`
PreDyIDStr string `json:"pre_dy_id_str"`
OrigDyIDStr string `json:"orig_dy_id_str"`
RidStr string `json:"rid_str"`
Bvid string `json:"bvid"`
} `json:"desc,omitempty"`
Display2 struct {
TopicInfo struct {
TopicDetails []struct {
TopicID int `json:"topic_id"`
TopicName string `json:"topic_name"`
IsActivity int `json:"is_activity"`
TopicLink string `json:"topic_link"`
} `json:"topic_details"`
} `json:"topic_info"`
UsrActionTxt string `json:"usr_action_txt"`
Relation struct {
Status int `json:"status"`
IsFollow int `json:"is_follow"`
IsFollowed int `json:"is_followed"`
} `json:"relation"`
} `json:"display,omitempty"`
Desc3 struct {
UID int `json:"uid"`
Type int `json:"type"`
Rid int64 `json:"rid"`
ACL int `json:"acl"`
View int `json:"view"`
Repost int `json:"repost"`
Comment int `json:"comment"`
Like int `json:"like"`
IsLiked int `json:"is_liked"`
DynamicID int64 `json:"dynamic_id"`
Timestamp int `json:"timestamp"`
PreDyID int `json:"pre_dy_id"`
OrigDyID int `json:"orig_dy_id"`
OrigType int `json:"orig_type"`
UserProfile struct {
Info struct {
UID int `json:"uid"`
Uname string `json:"uname"`
Face string `json:"face"`
} `json:"info"`
Card struct {
OfficialVerify struct {
Type int `json:"type"`
Desc string `json:"desc"`
} `json:"official_verify"`
} `json:"card"`
Vip struct {
VipType int `json:"vipType"`
VipDueDate int64 `json:"vipDueDate"`
DueRemark string `json:"dueRemark"`
AccessStatus int `json:"accessStatus"`
VipStatus int `json:"vipStatus"`
VipStatusWarn string `json:"vipStatusWarn"`
ThemeType int `json:"themeType"`
Label struct {
Path string `json:"path"`
} `json:"label"`
} `json:"vip"`
Pendant struct {
Pid int `json:"pid"`
Name string `json:"name"`
Image string `json:"image"`
Expire int `json:"expire"`
ImageEnhance string `json:"image_enhance"`
} `json:"pendant"`
Rank string `json:"rank"`
Sign string `json:"sign"`
LevelInfo struct {
CurrentLevel int `json:"current_level"`
CurrentMin int `json:"current_min"`
CurrentExp int `json:"current_exp"`
NextExp string `json:"next_exp"`
} `json:"level_info"`
} `json:"user_profile"`
UIDType int `json:"uid_type"`
Stype int `json:"stype"`
RType int `json:"r_type"`
InnerID int `json:"inner_id"`
Status int `json:"status"`
DynamicIDStr string `json:"dynamic_id_str"`
PreDyIDStr string `json:"pre_dy_id_str"`
OrigDyIDStr string `json:"orig_dy_id_str"`
RidStr string `json:"rid_str"`
} `json:"desc,omitempty"`
} `json:"cards"`
NextOffset int64 `json:"next_offset"`
Gt int `json:"_gt_"`
} `json:"data"`
}
Click to show internal directories.
Click to hide internal directories.