add Dockerfile
This commit is contained in:
parent
9ec3357780
commit
d5a977ade0
|
@ -0,0 +1,15 @@
|
||||||
|
FROM golang:alpine
|
||||||
|
|
||||||
|
ENV MODE=production
|
||||||
|
|
||||||
|
WORKDIR /go/src/app
|
||||||
|
COPY . .
|
||||||
|
|
||||||
|
RUN go build -o main .
|
||||||
|
|
||||||
|
EXPOSE 8080
|
||||||
|
|
||||||
|
ADD https://github.com/ufoscout/docker-compose-wait/releases/download/2.2.1/wait ./wait
|
||||||
|
RUN chmod +x ./wait
|
||||||
|
|
||||||
|
CMD ./wait && ./main
|
|
@ -1,6 +1,7 @@
|
||||||
package discord
|
package discord
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"fmt"
|
||||||
"strings"
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -24,7 +25,19 @@ func (cmd Command) WithPrefix(prefix string) string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Session) sendHelpMessage(mention, channelID string) {
|
func (s *Session) sendHelpMessage(mention, channelID string) {
|
||||||
s.SendMessage(channelID, mention+" zaraz ogarnę help cmd")
|
s.SendMessage(channelID, mention+"```Dostępne komendy \n"+fmt.Sprintf(`
|
||||||
|
- %s [świat] [id] - dodaje plemię z danego świata do obserwowanych
|
||||||
|
- %s - wyświetla wszystkie obserwowane plemiona
|
||||||
|
- %s [id z %s] - usuwa plemię z obserwowanych
|
||||||
|
- %s - ustawia kanał na którym będą wyświetlać się informacje o straconych wioskach
|
||||||
|
- %s - ustawia kanał na którym będą wyświetlać się informacje o podbitych wioskach
|
||||||
|
`,
|
||||||
|
AddCommand.WithPrefix(s.cfg.CommandPrefix),
|
||||||
|
ListCommand.WithPrefix(s.cfg.CommandPrefix),
|
||||||
|
DeleteCommand.WithPrefix(s.cfg.CommandPrefix),
|
||||||
|
ListCommand.WithPrefix(s.cfg.CommandPrefix),
|
||||||
|
LostVillagesCommand.WithPrefix(s.cfg.CommandPrefix),
|
||||||
|
ConqueredVillagesCommand.WithPrefix(s.cfg.CommandPrefix))+"```")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (s *Session) sendUnknownCommandError(mention, channelID string, command ...string) {
|
func (s *Session) sendUnknownCommandError(mention, channelID string, command ...string) {
|
||||||
|
|
Reference in New Issue