/
structs.go
75 lines (66 loc) · 1.18 KB
/
structs.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
package main
import (
"github.com/boltdb/bolt"
"github.com/bwmarrin/discordgo"
"github.com/jonas747/dca"
"os/exec"
"sync"
//"gopkg.in/hraban/opus.v2"
)
type Options struct {
DiscordToken string
DiscordStatus string
DiscordPrefix string
DiscordPurgeTime int64
DiscordPlayStatus bool
YoutubeToken string
}
type TimeDuration struct {
Day int
Hour int
Minute int
Second int
}
type Song struct {
ChannelID string
User string
ID string
VidID string
Title string
Duration string
VideoURL string
}
type PurgeMessage struct {
ID, ChannelID string
TimeSent int64
}
type Channel struct {
db *bolt.DB
}
type PkgSong struct {
data Song
v *VoiceInstance
}
type PkgRadio struct {
data string
v *VoiceInstance
}
type VoiceInstance struct {
voice *discordgo.VoiceConnection
session *discordgo.Session
encoder *dca.EncodeSession
stream *dca.StreamingSession
run *exec.Cmd
queueMutex sync.Mutex
audioMutex sync.Mutex
nowPlaying Song
queue []Song
recv []int16
guildID string
channelID string
speaking bool
pause bool
stop bool
skip bool
radioFlag bool
}