This commit is contained in:
shoopea 2019-05-03 11:00:09 +08:00
parent ad7c28af97
commit 512f82d643
3 changed files with 15 additions and 2 deletions

View File

@ -13,5 +13,10 @@ database = chirpnest
[rabbit] [rabbit]
user = chirpnest user = chirpnest
password = chirpnest password = chirpnest
address = localhost:5672 host = localhost:5672
queue = chirpnest queue = chirpnest
[bot]
admin_id = 0
guildname = Guild
guild = GLD

View File

@ -30,6 +30,11 @@ type Config struct {
Host string Host string
Queue string Queue string
} }
Bot struct {
Admin_id uint64
Guidname string
Guild string
}
} }
var ( var (

3
sql.go
View File

@ -57,6 +57,9 @@ func initDB() {
user_id VARCHAR(32) NOT NULL, user_id VARCHAR(32) NOT NULL,
name VARCHAR(80) NOT NULL, name VARCHAR(80) NOT NULL,
guild_id SMALLINT(5), guild_id SMALLINT(5),
last_msg TIMESTAMP,
busy_until TIMESTAMP,
role ENUM('commander', 'bartebder', 'squire', 'none'),
PRIMARY KEY (id) PRIMARY KEY (id)
) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci;`) ) ENGINE = InnoDB CHARSET=utf8 COLLATE utf8_unicode_ci;`)
if err != nil { if err != nil {