mirror of
https://github.com/jackmerrill/hampbot.git
synced 2025-04-18 09:30:47 -04: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"
|
build-target = "runner"
|
||||||
|
|
||||||
[http_service]
|
[http_service]
|
||||||
internal_port = 8080
|
auto_stop_machines = true
|
||||||
force_https = true
|
|
||||||
auto_stop_machines = false
|
|
||||||
auto_start_machines = true
|
auto_start_machines = true
|
||||||
min_machines_running = 1
|
min_machines_running = 1
|
||||||
processes = ["app"]
|
processes = ["app"]
|
||||||
|
@ -24,7 +24,7 @@ type Machine struct {
|
|||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
Type MachineType `json:"type"`
|
Type MachineType `json:"type"`
|
||||||
Status string `json:"status"`
|
Status string `json:"status"`
|
||||||
Time *time.Time `json:"time"`
|
Time *string `json:"time"`
|
||||||
EstimatedTime *time.Time `json:"estimatedTime"`
|
EstimatedTime *time.Time `json:"estimatedTime"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
5
main.go
5
main.go
@ -12,6 +12,7 @@ import (
|
|||||||
studentlife "github.com/jackmerrill/hampbot/internal/commands/studentlife"
|
studentlife "github.com/jackmerrill/hampbot/internal/commands/studentlife"
|
||||||
util "github.com/jackmerrill/hampbot/internal/commands/util"
|
util "github.com/jackmerrill/hampbot/internal/commands/util"
|
||||||
"github.com/jackmerrill/hampbot/internal/utils/config"
|
"github.com/jackmerrill/hampbot/internal/utils/config"
|
||||||
|
"github.com/jackmerrill/hampbot/internal/utils/embed"
|
||||||
"github.com/zekroTJA/shireikan"
|
"github.com/zekroTJA/shireikan"
|
||||||
|
|
||||||
"github.com/charmbracelet/log"
|
"github.com/charmbracelet/log"
|
||||||
@ -46,6 +47,10 @@ func main() {
|
|||||||
InvokeToLower: true,
|
InvokeToLower: true,
|
||||||
UseDefaultHelpCommand: true,
|
UseDefaultHelpCommand: true,
|
||||||
OnError: func(ctx shireikan.Context, typ shireikan.ErrorType, err error) {
|
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)
|
log.Error(err)
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
Loading…
x
Reference in New Issue
Block a user