mirror of
https://github.com/mgerb/go-discord-bot
synced 2026-01-11 01:22:48 +00:00
use permissions from database - updated bot-scripts
This commit is contained in:
27
server/scripts/main.go
Normal file
27
server/scripts/main.go
Normal file
@@ -0,0 +1,27 @@
|
||||
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])
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user