diff --git a/internal/systems/plugins/api.go b/internal/systems/plugins/api.go index aa47c78..2452213 100644 --- a/internal/systems/plugins/api.go +++ b/internal/systems/plugins/api.go @@ -79,7 +79,7 @@ func (oa *owobotAPI) On(eventType string, fn goja.Value) { handlersMtx.Lock() defer handlersMtx.Unlock() - + oa.loop.RunOnLoop(func(vm *goja.Runtime) { this := vm.ToValue(oa) diff --git a/internal/systems/plugins/init.go b/internal/systems/plugins/init.go index 5942942..47ddd9c 100644 --- a/internal/systems/plugins/init.go +++ b/internal/systems/plugins/init.go @@ -131,7 +131,6 @@ func Load(dir string, sess *discordgo.Session) error { vm.GlobalObject().Set("discord", builtins.Constants), vm.GlobalObject().Set("print", fmt.Println), ) - }) if err != nil { return err diff --git a/internal/systems/roles/handlers.go b/internal/systems/roles/handlers.go index 91a1551..41bdf91 100644 --- a/internal/systems/roles/handlers.go +++ b/internal/systems/roles/handlers.go @@ -37,4 +37,4 @@ func onRoleButton(s *discordgo.Session, i *discordgo.InteractionCreate) error { } return util.RespondEphemeral(s, i.Interaction, fmt.Sprintf("Successfully assigned role <@&%s> to you", roleID)) } -} \ No newline at end of file +} diff --git a/internal/systems/tickets/handlers.go b/internal/systems/tickets/handlers.go index 1a3e222..2e8803f 100644 --- a/internal/systems/tickets/handlers.go +++ b/internal/systems/tickets/handlers.go @@ -4,8 +4,8 @@ import ( "database/sql" "errors" - "go.elara.ws/logger/log" "github.com/bwmarrin/discordgo" + "go.elara.ws/logger/log" ) // onMemberLeave closes any tickets a user had open when they leave @@ -19,4 +19,4 @@ func onMemberLeave(s *discordgo.Session, gmr *discordgo.GuildMemberRemove) { log.Warn("Error removing ticket after user left").Err(err).Send() return } -} \ No newline at end of file +}