mirror of
https://github.com/jackmerrill/hampbot.git
synced 2024-12-04 13:02:59 -08:00
im smart
This commit is contained in:
parent
71f878ba65
commit
1c6162962f
4
fly.toml
4
fly.toml
|
@ -10,9 +10,7 @@ primary_region = "bos"
|
|||
build-target = "runner"
|
||||
|
||||
[http_service]
|
||||
internal_port = 8080
|
||||
force_https = true
|
||||
auto_stop_machines = false
|
||||
auto_stop_machines = true
|
||||
auto_start_machines = true
|
||||
min_machines_running = 1
|
||||
processes = ["app"]
|
||||
|
|
|
@ -24,7 +24,7 @@ type Machine struct {
|
|||
Name string `json:"name"`
|
||||
Type MachineType `json:"type"`
|
||||
Status string `json:"status"`
|
||||
Time *time.Time `json:"time"`
|
||||
Time *string `json:"time"`
|
||||
EstimatedTime *time.Time `json:"estimatedTime"`
|
||||
}
|
||||
|
||||
|
|
5
main.go
5
main.go
|
@ -12,6 +12,7 @@ import (
|
|||
studentlife "github.com/jackmerrill/hampbot/internal/commands/studentlife"
|
||||
util "github.com/jackmerrill/hampbot/internal/commands/util"
|
||||
"github.com/jackmerrill/hampbot/internal/utils/config"
|
||||
"github.com/jackmerrill/hampbot/internal/utils/embed"
|
||||
"github.com/zekroTJA/shireikan"
|
||||
|
||||
"github.com/charmbracelet/log"
|
||||
|
@ -46,6 +47,10 @@ func main() {
|
|||
InvokeToLower: true,
|
||||
UseDefaultHelpCommand: true,
|
||||
OnError: func(ctx shireikan.Context, typ shireikan.ErrorType, err error) {
|
||||
ctx.GetSession().ChannelMessageSendComplex(ctx.GetChannel().ID, &discordgo.MessageSend{
|
||||
Embed: embed.NewErrorEmbed(ctx).SetTitle("Error").SetDescription(err.Error()).MessageEmbed,
|
||||
Reference: ctx.GetMessage().Reference(),
|
||||
})
|
||||
log.Error(err)
|
||||
},
|
||||
})
|
||||
|
|
Loading…
Reference in New Issue
Block a user