This commit is contained in:
parent
2462aed8af
commit
5eb9013f9d
14
Dockerfile
Normal file
14
Dockerfile
Normal 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"]
|
||||
@ -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 {
|
||||
|
||||
@ -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 {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user