grim/wasdead
Clone
Summary
Browse
Changes
Graph
remove the database move hack, it was a hack and a dumb one
draft
2020-09-26, Gary Kramlich
81d77ff37d53
remove the database move hack, it was a hack and a dumb one
package
main
import
(
"fmt"
"github.com/alecthomas/kong"
"bitbucket.org/rw_grim/wasdead/commands"
"bitbucket.org/rw_grim/wasdead/globals"
"bitbucket.org/rw_grim/wasdead/run"
)
const
(
version
=
"0.1.0"
)
type
versionCmd
struct
{}
func
(
c
*
versionCmd
)
Run
(
g
*
globals
.
Globals
)
error
{
fmt
.
Printf
(
"wasdead v%s\n"
,
version
)
return
nil
}
type
cli
struct
{
globals
.
Globals
Run
run
.
RunCmd
`kong:"cmd,help='Run the bot',default='1'"`
Tidy
commands
.
TidyCmd
`kong:"cmd,help='clean up the database'"`
Version
versionCmd
`kong:"cmd,help='Display the version of this program'"`
}
func
main
()
{
cli
:=
cli
{}
ctx
:=
kong
.
Parse
(
&
cli
,
kong
.
Name
(
"wasdead"
),
kong
.
Description
(
"A live stream announcement bot for discord"
),
kong
.
UsageOnError
(),
)
err
:=
ctx
.
Run
(
&
cli
.
Globals
)
ctx
.
FatalIfErrorf
(
err
)
}