This commit is contained in:
Dot-Rar 2020-05-13 22:10:34 +01:00
parent 20df3b22ee
commit cc8470f30d
3 changed files with 2 additions and 5 deletions

View File

@ -110,8 +110,6 @@ func SendMessage(ctx *gin.Context) {
}
}
fmt.Println(1)
body.Message = fmt.Sprintf("**%s**: %s", user.Username, body.Message)
if len(body.Message) > 2000 {
body.Message = body.Message[0:1999]

View File

@ -84,7 +84,7 @@ func CallbackHandler(ctx *gin.Context) {
// Cache guilds because Discord takes like 2 whole seconds to return then
go func() {
var guilds []*guild.Guild
var guilds []guild.Guild
err, _ = userEndpoint.CurrentUserGuilds.Request(store, nil, nil, &guilds)
if err != nil {
log.Error(err.Error())
@ -109,7 +109,6 @@ func CallbackHandler(ctx *gin.Context) {
})
}
// TODO: Error handling
if err := dbclient.Client.UserGuilds.Set(currentUser.Id, wrappedGuilds); err != nil {
log.Error(err.Error())
}

2
go.mod
View File

@ -5,7 +5,7 @@ go 1.14
require (
github.com/BurntSushi/toml v0.3.1
github.com/TicketsBot/archiverclient v0.0.0-20200425115930-0ca198cc8306
github.com/TicketsBot/database v0.0.0-20200513192600-2527899a882f
github.com/TicketsBot/database v0.0.0-20200513210802-2adabede3591
github.com/apex/log v1.1.2
github.com/boj/redistore v0.0.0-20180917114910-cd5dcc76aeff // indirect
github.com/dgrijalva/jwt-go v3.2.0+incompatible