Publish docker image
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Malachy Byrne 2025-04-01 16:22:16 +01:00
parent 2462aed8af
commit 5eb9013f9d
Signed by: malmal200
GPG Key ID: EC21443030A655D9
3 changed files with 15 additions and 2 deletions

14
Dockerfile Normal file
View File

@ -0,0 +1,14 @@
FROM golang:1.23
LABEL authors="malmal200"
WORKDIR /app
COPY go.mod go.sum ./
RUN go mod download
COPY dice/*.go ./dice/
COPY application/*.go ./application/
RUN CGO_ENABLED=0 GOOS=linux go build -o /go-bot ./application
ENTRYPOINT ["/go-bot"]

View File

@ -14,7 +14,6 @@ var prefix = os.Getenv("COMMAND_PREFIX")
func init() {
token := os.Getenv("DISCORD_TOKEN")
token = "ODgyNzI5OTg1MzgxNjUwNTEy.GEOiR0.MPRFc10hMG6RKLla4ic-gXP7oTKTFacbAFpapk"
var err error
s, err = discordgo.New("Bot " + token)
if err != nil {

View File

@ -78,7 +78,7 @@ func roll(opts optionMap) string {
if err != nil {
return fmt.Sprintf("Error rolling dice: %s", err)
}
total := 0
total := d.Add
for i, die := range roll {
_, err = fmt.Fprintf(&ret, "%v", die.Result)
if err != nil {