globals.go (view raw)
1package main
2
3import (
4 "os"
5
6 "github.com/BiRabittoh/disgord/myconfig"
7 "github.com/BiRabittoh/disgord/mylog"
8 "github.com/bwmarrin/discordgo"
9 "github.com/kkdai/youtube/v2"
10)
11
12const (
13 msgError = "Something went wrong."
14 helpFmt = "%s - _%s_"
15)
16
17var (
18 config *myconfig.Config[Config]
19
20 logger = mylog.NewLogger(os.Stdout, "main", mylog.DEBUG)
21 yt = youtube.Client{}
22)
23
24type KeyValue struct {
25 Key string `json:"key"`
26 Value string `json:"value"`
27}
28
29type Config struct {
30 ApplicationID string `json:"applicationId"`
31 Token string `json:"token"`
32
33 Prefix string `json:"prefix"`
34
35 Outros []KeyValue `json:"outros"`
36 Radios []KeyValue `json:"radios"`
37
38 MagazineSize uint `json:"magazineSize"`
39}
40
41type BotCommand struct {
42 Handler func([]string, *discordgo.Session, *discordgo.MessageCreate) string
43 ShortCode string
44 Help string
45}