Improved error handling and add ca certificates

pull/4/head
Jonas Franz 4 years ago
parent 5bd6da233b
commit ee718f788a
  1. 2
      Dockerfile
  2. 5
      bot.go

@ -5,6 +5,6 @@ WORKDIR ${GOPATH}/src/git.jonasfranz.software/JonasFranzDEV/mensabot
RUN go build
FROM alpine:3.7
ENV MENSABOT_TOKEN token
RUN apk --no-cache add ca-certificates
COPY --from=build-env /go/src/git.jonasfranz.software/JonasFranzDEV/mensabot/mensabot /app/mensabot/mensabot
ENTRYPOINT ["/app/mensabot/mensabot"]

@ -35,9 +35,12 @@ func main() {
return
}
dg, err := discordgo.New(fmt.Sprintf("Bot %s", token))
if err != nil {
fmt.Println("error creating dicord bot: ", err)
}
canteens, err := openmensa.GetCanteens(175)
if err != nil {
fmt.Println("error creating discord bot: ", err)
fmt.Println("error getting mensa: ", err)
return
}
dg.AddHandler(messageCreate)

Loading…
Cancel
Save