add moderator role command

This commit is contained in:
Dustin Pianalto
2021-01-25 21:52:12 -09:00
parent cab3b15993
commit 21a7515797
4 changed files with 55 additions and 0 deletions
+6
View File
@@ -111,3 +111,9 @@ func (s guildService) GetOrCreateGuild(id string) (geeksbot.Guild, error) {
}
return guild, err
}
func (s guildService) CreateOrUpdateRole(r geeksbot.Role) (geeksbot.Role, error) {
queryString := "INSERT INTO roles (id, role_type, guild_id) VALUES ($1, $2, $3)"
_, err := s.db.Exec(queryString, r.ID, r.RoleType, r.Guild.ID)
return r, err
}