Compare commits

...
2 Commits
Author SHA1 Message Date
Dustin Pianalto 6a08f06101 Compare servernames as lower
CI / build (push) Has been cancelled
2021-02-24 14:29:32 -09:00
Dustin Pianalto dddcc8c316 Update format on listplayers output
CI / build (push) Has been cancelled
2021-02-24 14:10:55 -09:00
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -98,6 +98,6 @@ func listplayers(ctx disgoman.Context, server geeksbot.Server) {
}
}
_, _ = ctx.Session.ChannelMessageEdit(ctx.Channel.ID, msg.ID,
fmt.Sprintf("**%s:**\n%s", server.Name, strings.Join(players, "\n")),
fmt.Sprintf("**%s:**%s", server.Name, strings.Join(players, "\n")),
)
}
+1 -1
View File
@@ -74,7 +74,7 @@ func (s serverService) ServerByID(id int) (geeksbot.Server, error) {
func (s serverService) ServerByName(name string, guild geeksbot.Guild) (geeksbot.Server, error) {
var id int
queryString := "SELECT id FROM servers WHERE name = $1 AND guild_id = $2"
queryString := "SELECT id FROM servers WHERE LOWER(name) = LOWER($1) AND guild_id = $2"
row := s.db.QueryRow(queryString, name, guild.ID)
err := row.Scan(&id)
if err != nil {