-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.go
More file actions
47 lines (41 loc) · 1014 Bytes
/
Copy pathmain.go
File metadata and controls
47 lines (41 loc) · 1014 Bytes
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
package main
import (
"os"
"github.com/andersfylling/disgord"
"github.com/aplombomb/boombot/config"
"github.com/aplombomb/boombot/discord"
_ "github.com/lib/pq"
"github.com/sirupsen/logrus"
)
var log = &logrus.Logger{
Out: os.Stderr,
Formatter: new(logrus.TextFormatter),
Hooks: make(logrus.LevelHooks),
Level: logrus.ErrorLevel,
}
func main() {
creds, err := config.GetSecrets()
if err != nil {
log.Fatalf("Error retrieving secrets: %+v", err)
}
client := disgord.New(disgord.Config{
ProjectName: "BoomBot",
BotToken: creds.BotToken,
Logger: log,
RejectEvents: []string{
disgord.EvtTypingStart,
disgord.EvtGuildMemberAdd,
disgord.EvtPresenceUpdate,
disgord.EvtGuildMemberUpdate,
disgord.EvtGuildMemberRemove,
},
Presence: &disgord.UpdateStatusPayload{
Game: &disgord.Activity{
Name: "Copyrighted Music",
Type: 1,
},
},
Cache: &disgord.CacheNop{},
})
discord.BotRun(client, "&", "187298550193979392", creds.YoutubeToken)
}