1
0
mirror of https://github.com/mgerb/go-discord-bot synced 2026-01-09 08:32:48 +00:00
Files
go-discord-bot/server/scripts/main.go

28 lines
388 B
Go

package main
import (
"fmt"
"os"
)
func main() {
if len(os.Args) == 1 {
fmt.Print("Error - Invalid Args\n\nPossible Args:\nrestore-message\nupdate-db\n\n")
return
}
arg := os.Args[1]
switch arg {
case "update-db":
updateDB()
case "restore-messages":
if len(os.Args) < 3 {
fmt.Println("Please provide a channel id")
return
}
restoreMessages(os.Args[2])
}
}