Browse Source

Update deps

master
Gregory Rudolph 3 years ago
parent
commit
0faab96efb
Signed by: rudi
GPG Key ID: EF64F3CBD1A1EBDD
  1. 3
      .gitignore
  2. 2
      botCommands.go
  3. 157
      commands.go
  4. 8
      go.mod
  5. 20
      go.sum
  6. 25
      login.go
  7. 19
      main.go
  8. 204
      teslabot.log

3
.gitignore vendored

@ -1,2 +1,3 @@ @@ -1,2 +1,3 @@
helabot
teslabot
teslabot.log
teslabot

2
botCommands.go

@ -9,7 +9,7 @@ func setupCommands() { @@ -9,7 +9,7 @@ func setupCommands() {
Commands: []chat1.UserBotCommandInput{
{
Name: "authenticate",
Description: "Authenticate with Tesla, please use exploding message.",
Description: "Authenticate with Tesla, please use exploding message for username/password OR a token.",
Usage: "email@example.com Pa$$w0rd",
},
},

157
commands.go

@ -14,18 +14,15 @@ import ( @@ -14,18 +14,15 @@ import (
func reset(m chat1.MsgSummary) {
_, err := k.KVDelete(&m.Channel.Name, "teslabot", "authtok")
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error resetting your authentication. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error resetting your authentication. Contact @rudi9719 for more information with code %+v")
return
}
_, err = k.KVDelete(&m.Channel.Name, "teslabot", "startPass")
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error resetting your authentication. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error resetting your authentication. Contact @rudi9719 for more information with code %+v")
return
}
k.SendMessageByConvID(m.ConvID, "Your credentials have been reset successfully.")
}
func authenticate(m chat1.MsgSummary) {
@ -38,25 +35,26 @@ func authenticate(m chat1.MsgSummary) { @@ -38,25 +35,26 @@ func authenticate(m chat1.MsgSummary) {
k.SendMessageByConvID(m.ConvID, "Please remember to delete your message after we have authenticated!")
}
parts := strings.Split(m.Content.Text.Body, " ")
if len(parts) != 3 {
k.SendMessageByConvID(m.ConvID, "Invalid input for command authenticate. Requires username and password. This information is not stored in keybase, or logged.")
if len(parts) != 3 && len(parts) != 2 {
k.SendMessageByConvID(m.ConvID, "Invalid input for command authenticate. Requires username and password. This information is not stored in keybase, or logged. %+v", len(parts))
return
}
username := parts[1]
password := parts[2]
t, err := login(context.Background(), username, password)
var username, password, tok string
if len(parts) == 3 {
username = parts[1]
password = parts[2]
} else {
tok = parts[1]
}
t, err := login(context.Background(), username, password, tok)
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error logging in. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error logging in. Contact @rudi9719 for more information with code %+v")
return
}
log.LogDebug("Token created for %+v", m.Sender.Username)
_, err = k.KVPut(&m.Channel.Name, "teslabot", "authtok", t)
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error storing your auth token. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error storing your auth token. Contact @rudi9719 for more information with code %+v")
return
}
k.ReactByConvID(m.ConvID, m.Id, ":car:")
@ -71,9 +69,7 @@ func listVehicles(m chat1.MsgSummary) { @@ -71,9 +69,7 @@ func listVehicles(m chat1.MsgSummary) {
}
v, err := c.Vehicles()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error listing vehicles. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error listing vehicles. Contact @rudi9719 for more information with code %+v")
return
}
ret := "Detected vehicles for account: ```"
@ -88,17 +84,17 @@ func listVehicles(m chat1.MsgSummary) { @@ -88,17 +84,17 @@ func listVehicles(m chat1.MsgSummary) {
func deferTime(m chat1.MsgSummary) {
parts := strings.Split(m.Content.Text.Body, " ")
t := parts[1]
start := time.Now()
command := strings.Join(parts[2:], " ")
m.Content.Text.Body = fmt.Sprintf("!%+v", command)
timer, err := time.ParseDuration(t)
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error parsing your time input. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error parsing your time input. Contact @rudi9719 for more information with code %+v")
return
}
k.SendMessageByConvID(m.ConvID, fmt.Sprintf("I will run %+v at %+v", command, time.Now().Add(timer).Format("Jan _2 15:04:05")))
k.SendMessageByConvID(m.ConvID, fmt.Sprintf("I will run `%+v` at %+v", command, time.Now().Add(timer).Format("Jan _2 15:04:05")))
time.Sleep(timer)
k.SendMessageByConvID(m.ConvID, fmt.Sprintf("Running `%+v` from %+v", command, start.Format("Jan _2 15:04:05")))
handleChat(m)
}
@ -109,9 +105,7 @@ func honk(m chat1.MsgSummary) { @@ -109,9 +105,7 @@ func honk(m chat1.MsgSummary) {
}
err := v.HonkHorn()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error honking your horn. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error honking your horn. Contact @rudi9719 for more information with code %+v")
return
}
k.SendMessageByConvID(m.ConvID, "I've honked your horn!")
@ -124,27 +118,26 @@ func chargeStatus(m chat1.MsgSummary) { @@ -124,27 +118,26 @@ func chargeStatus(m chat1.MsgSummary) {
}
state, err := v.ChargeState()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error getting charge state. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error getting charge state. Contact @rudi9719 for more information with code %+v")
return
}
ret := fmt.Sprintf("Status for %+v: ```", v.DisplayName)
ret += fmt.Sprintf("\nCurrent Charge: %+v (%+vmi)", state.BatteryLevel, state.BatteryRange)
if state.ChargingState != "Disconnected" {
ret += fmt.Sprintf("\nCharging State: %+v", state.ChargingState)
ret += fmt.Sprintf("\nTime to full: %+vmin", state.MinutesToFullCharge)
ret += fmt.Sprintf("\nConnected Cable: %+v", state.ConnChargeCable)
if state.FastChargerPresent {
ret += fmt.Sprintf("\nFast Charger: %+v %+v", state.FastChargerBrand, state.FastChargerType)
ret += fmt.Sprintf("\nCharging State: %+v", state.ChargingState)
if state.ChargingState != "Stopped" {
ret += fmt.Sprintf("\nTime to full: %+vmin", state.MinutesToFullCharge)
if state.FastChargerPresent {
ret += fmt.Sprintf("\nFast Charger: %+v %+v", state.FastChargerBrand, state.FastChargerType)
}
}
}
ret += "```\n"
if state.BatteryHeaterOn {
ret += "The battery heater is on. "
}
if state.ChargePortDoorOpen {
if state.ChargePortDoorOpen && state.ChargingState == "Disconnected" {
ret += "The charge port is open. "
}
k.SendMessageByConvID(m.ConvID, ret)
@ -157,9 +150,7 @@ func flashLights(m chat1.MsgSummary) { @@ -157,9 +150,7 @@ func flashLights(m chat1.MsgSummary) {
}
err := v.FlashLights()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error flashing your lights. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error flashing your lights. Contact @rudi9719 for more information with code %+v")
return
}
@ -173,16 +164,12 @@ func currentTemp(m chat1.MsgSummary) { @@ -173,16 +164,12 @@ func currentTemp(m chat1.MsgSummary) {
}
guiSettings, err := v.GuiSettings()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error getting your preferences. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error getting your preferences. Contact @rudi9719 for more information with code %+v")
return
}
climateState, err := v.ClimateState()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error getting your Climate State. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error getting your Climate State. Contact @rudi9719 for more information with code %+v")
return
}
tempSetting := climateState.DriverTempSetting
@ -207,9 +194,7 @@ func setClimate(m chat1.MsgSummary) { @@ -207,9 +194,7 @@ func setClimate(m chat1.MsgSummary) {
}
guiSettings, err := v.GuiSettings()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error getting your preferences. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error getting your preferences. Contact @rudi9719 for more information with code %+v")
return
}
parts := strings.Split(m.Content.Text.Body, " ")
@ -217,18 +202,14 @@ func setClimate(m chat1.MsgSummary) { @@ -217,18 +202,14 @@ func setClimate(m chat1.MsgSummary) {
if val == "on" {
err := v.StartAirConditioning()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error starting your Climate. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error starting your Climate. Contact @rudi9719 for more information with code %+v")
return
}
}
if val == "off" {
err := v.StopAirConditioning()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error turning off your Climate. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error turning off your Climate. Contact @rudi9719 for more information with code %+v")
return
}
}
@ -238,25 +219,19 @@ func setClimate(m chat1.MsgSummary) { @@ -238,25 +219,19 @@ func setClimate(m chat1.MsgSummary) {
}
err = v.SetTemperature(float64(temp), float64(temp))
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error setting your Climate. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error setting your Climate. Contact @rudi9719 for more information with code %+v")
return
}
err = v.StartAirConditioning()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error starting your Climate. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error starting your Climate. Contact @rudi9719 for more information with code %+v")
return
}
}
}
climateState, err := v.ClimateState()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error getting your Climate State. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error getting your Climate State. Contact @rudi9719 for more information with code %+v")
return
}
tempSetting := climateState.DriverTempSetting
@ -280,9 +255,7 @@ func lockVehicle(m chat1.MsgSummary) { @@ -280,9 +255,7 @@ func lockVehicle(m chat1.MsgSummary) {
}
err := v.LockDoors()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error locking your doors. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error locking your doors. Contact @rudi9719 for more information with code %+v")
return
}
}
@ -294,9 +267,7 @@ func unlockVehicle(m chat1.MsgSummary) { @@ -294,9 +267,7 @@ func unlockVehicle(m chat1.MsgSummary) {
}
err := v.UnlockDoors()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error unlocking your doors. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error unlocking your doors. Contact @rudi9719 for more information with code %+v")
return
}
}
@ -308,17 +279,13 @@ func startCharge(m chat1.MsgSummary) { @@ -308,17 +279,13 @@ func startCharge(m chat1.MsgSummary) {
}
state, err := v.ChargeState()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error getting charge state. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error getting charge state. Contact @rudi9719 for more information with code %+v")
return
}
if state.ChargingState != "Disconnected" && state.FastChargerBrand != "Tesla" {
err := v.StartCharging()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error starting your charge. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error starting your charge. Contact @rudi9719 for more information with code %+v")
return
}
} else {
@ -334,17 +301,13 @@ func stopCharge(m chat1.MsgSummary) { @@ -334,17 +301,13 @@ func stopCharge(m chat1.MsgSummary) {
}
state, err := v.ChargeState()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error getting charge state. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error getting charge state. Contact @rudi9719 for more information with code %+v")
return
}
if state.ChargingState != "Disconnected" && state.FastChargerBrand != "Tesla" {
err := v.StopCharging()
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error stopping your charge. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error stopping your charge. Contact @rudi9719 for more information with code %+v")
return
}
} else {
@ -364,9 +327,7 @@ func enableStart(m chat1.MsgSummary) { @@ -364,9 +327,7 @@ func enableStart(m chat1.MsgSummary) {
}
_, err := k.KVPut(&m.Channel.Name, "teslabot", "startPass", parts[2])
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error storing your password. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error storing your password. Contact @rudi9719 for more information with code %+v")
return
}
@ -375,9 +336,7 @@ func enableStart(m chat1.MsgSummary) { @@ -375,9 +336,7 @@ func enableStart(m chat1.MsgSummary) {
func disableStart(m chat1.MsgSummary) {
_, err := k.KVDelete(&m.Channel.Name, "teslabot", "startPass")
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error deleting your password. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error deleting your password. Contact @rudi9719 for more information with code %+v")
return
}
}
@ -394,9 +353,7 @@ func startVehicle(m chat1.MsgSummary) { @@ -394,9 +353,7 @@ func startVehicle(m chat1.MsgSummary) {
}
err := v.Start(test.EntryValue)
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error starting your vehicle. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error starting your vehicle. Contact @rudi9719 for more information with code %+v")
return
}
k.SendMessageByConvID(m.ConvID, "Your vehicle has been started!")
@ -420,9 +377,7 @@ func openTrunk(m chat1.MsgSummary) { @@ -420,9 +377,7 @@ func openTrunk(m chat1.MsgSummary) {
case "front":
err := v.OpenTrunk(strings.ToLower(trunk))
if err != nil {
tracker := uuid.NewString()
k.SendMessageByConvID(m.ConvID, "There was an error opening your trunk. Contact @rudi9719 for more information with code %+v", tracker)
log.LogError("%+v: %+v", tracker, err)
handleError(err, m, "There was an error opening your trunk. Contact @rudi9719 for more information with code %+v")
return
}
default:
@ -431,3 +386,19 @@ func openTrunk(m chat1.MsgSummary) { @@ -431,3 +386,19 @@ func openTrunk(m chat1.MsgSummary) {
}
}
func handleError(err error, m chat1.MsgSummary, msg string) {
tracker := uuid.NewString()
log.LogError("%+v: %+v", tracker, err)
if strings.HasPrefix(err.Error(), "405") {
k.SendMessageByConvID(m.ConvID, "Tesla returned an error. Please ensure your vehicle isn't currently being serviced.")
} else if strings.HasPrefix(err.Error(), "400") {
k.SendMessageByConvID(m.ConvID, "Tesla returned an error. The command you tried to use may need an update. Please contact @rudi9719 with tracking ID %+v and the bad command.", tracker)
} else if !m.Content.Attachment.Uploaded && strings.HasPrefix(err.Error(), "408") {
k.SendMessageByConvID(m.ConvID, "Unable to wake vehicle within the timeframe. Trying to run the command again.")
m.Content.Attachment.Uploaded = true
handleChat(m)
} else {
k.SendMessageByConvID(m.ConvID, msg, tracker)
}
}

8
go.mod

@ -4,10 +4,8 @@ go 1.16 @@ -4,10 +4,8 @@ go 1.16
require (
github.com/bogosj/tesla v1.0.1
github.com/google/uuid v1.2.0 // indirect
github.com/manifoldco/promptui v0.8.0
github.com/rudi9719/loggy v0.0.0-20201031035735-9438c484de9a // indirect
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93 // indirect
samhofi.us/x/keybase v0.0.0-20200129212102-e05e93be9f3f // indirect
github.com/google/uuid v1.2.0
github.com/rudi9719/loggy v0.0.0-20201031035735-9438c484de9a
golang.org/x/oauth2 v0.0.0-20210220000619-9bb904979d93
samhofi.us/x/keybase/v2 v2.1.1
)

20
go.sum

@ -33,21 +33,14 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9 @@ -33,21 +33,14 @@ cloud.google.com/go/storage v1.10.0/go.mod h1:FLPqc6j+Ki4BU591ie1oL6qBQGu2Bl/tZ9
dmitri.shuralyov.com/gpu/mtl v0.0.0-20190408044501-666a987793e9/go.mod h1:H6x//7gZCb22OMCxBHrMx7a5I7Hp++hsVxbQ4BYO7hU=
github.com/BurntSushi/toml v0.3.1/go.mod h1:xHWCNGjB5oqiDr8zfno3MHue2Ht5sIBksp03qcyfWMU=
github.com/BurntSushi/xgb v0.0.0-20160522181843-27f122750802/go.mod h1:IVnqGOEym/WlBOVXweHU+Q+/VP0lqqI8lqeDx9IjBqo=
github.com/PuerkitoBio/goquery v1.6.1 h1:FgjbQZKl5HTmcn4sKBgvx8vv63nhyhIpv7lJpFGCWpk=
github.com/PuerkitoBio/goquery v1.6.1/go.mod h1:GsLWisAFVj4WgDibEWF4pvYnkVQBpKBKeU+7zCJoLcc=
github.com/PuerkitoBio/goquery v1.7.1 h1:oE+T06D+1T7LNrn91B4aERsRIeCLJ/oPSa6xB9FPnz4=
github.com/PuerkitoBio/goquery v1.7.1/go.mod h1:XY0pP4kfraEmmV1O7Uf6XyjoslwsneBbgeDjLYuN8xY=
github.com/andybalholm/cascadia v1.1.0 h1:BuuO6sSfQNFRu1LppgbD25Hr2vLYW25JvxHs5zzsLTo=
github.com/andybalholm/cascadia v1.1.0/go.mod h1:GsXiBklL0woXo1j/WYWtSYYC4ouU9PqHO0sqidkEA4Y=
github.com/andybalholm/cascadia v1.2.0 h1:vuRCkM5Ozh/BfmsaTm26kbjm0mIOM3yS5Ek/F5h18aE=
github.com/andybalholm/cascadia v1.2.0/go.mod h1:YCyR8vOZT9aZ1CHEd8ap0gMVm2aFgxBp0T0eFw1RUQY=
github.com/bogosj/tesla v1.0.0 h1:qV+0AMV6DJC/b/w8SXPNvUDHqGqugycl+Sv0EiQoypA=
github.com/bogosj/tesla v1.0.0/go.mod h1:xmG/yUw+GhxVB2m5GQLV4Vo/byvOf0wwhYGQ6IWPl+k=
github.com/bogosj/tesla v1.0.1 h1:4YOQd+Mfew1rPsL6eegNG4icY7MCj+cV+8MjhE2UMKs=
github.com/bogosj/tesla v1.0.1/go.mod h1:LPbTjUSyUTPhTyi6fpybXnv2t/Hv0V8FX6+hyEIpL98=
github.com/census-instrumentation/opencensus-proto v0.2.1/go.mod h1:f6KPmirojxKA12rnyqOA5BBL4O983OfeGPqjHWSTneU=
github.com/chzyer/logex v1.1.10/go.mod h1:+Ywpsq7O8HXn0nuIou7OrIPyXbp3wmkHB+jjWRnGsAI=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e h1:fY5BOSpyZCqRo5OhCuC+XN+r/bBCmeuuJtjz+bCNIf8=
github.com/chzyer/readline v0.0.0-20180603132655-2972be24d48e/go.mod h1:nSuG5e5PlCu98SY8svDHJxuZscDgtXS6KTTbou5AhLI=
github.com/chzyer/test v0.0.0-20180213035817-a1ea475d72b1/go.mod h1:Q3SI9o4m/ZMnBNeIyt5eFwwo7qiLfzFZmjNmxjkiQlU=
github.com/client9/misspell v0.3.4/go.mod h1:qj6jICC3Q7zFZvVWo7KLAzC3yx5G7kyvSDkc90ppPyw=
@ -93,6 +86,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw @@ -93,6 +86,7 @@ github.com/google/go-cmp v0.3.1/go.mod h1:8QqcDgzrUqlUb/G2PQTWiueGozuR1884gddMyw
github.com/google/go-cmp v0.4.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.4.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.0/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/go-cmp v0.5.1 h1:JFrFEBb2xKufg6XkJsJr+WbKb4FQlURi5RUcBveYu9k=
github.com/google/go-cmp v0.5.1/go.mod h1:v8dTdLbMG2kIc/vJvl+f65V22dbkXbowE6jgT/gNBxE=
github.com/google/martian v2.1.0+incompatible/go.mod h1:9I4somxYTbIHy5NJKHRl3wXiIaQGbYVAs8BPL6v8lEs=
github.com/google/martian/v3 v3.0.0/go.mod h1:y5Zk1BBys9G+gd6Jrk0W3cC1+ELVxBWuIGO+w/tUAp0=
@ -108,26 +102,23 @@ github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs= @@ -108,26 +102,23 @@ github.com/google/uuid v1.2.0 h1:qJYtXnJRWmpe7m/3XlyhrsLrEURqHRM2kxzoxXqyUDs=
github.com/google/uuid v1.2.0/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo=
github.com/googleapis/gax-go/v2 v2.0.4/go.mod h1:0Wqv26UfaUD9n4G6kQubkQ+KchISgw+vpHVxEJEs9eg=
github.com/googleapis/gax-go/v2 v2.0.5/go.mod h1:DWXyrwAJ9X0FpwwEdw+IPEYBICEFu5mhpdKc/us6bOk=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1 h1:EGx4pi6eqNxGaHF6qqu48+N2wcFQ5qg5FXgOdqsJ5d8=
github.com/gopherjs/gopherjs v0.0.0-20181017120253-0766667cb4d1/go.mod h1:wJfORRmW1u3UXTncJ5qlYoELFm8eSnnEO6hX4iZ3EWY=
github.com/hashicorp/golang-lru v0.5.0/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/hashicorp/golang-lru v0.5.1/go.mod h1:/m3WP610KZHVQ1SGc6re/UDhFvYD7pJ4Ao+sR/qLZy8=
github.com/ianlancetaylor/demangle v0.0.0-20181102032728-5e5cf60278f6/go.mod h1:aSSvb/t6k1mPoxDqO4vJh6VOCGPwU4O0C2/Eqndh1Sc=
github.com/jstemmer/go-junit-report v0.0.0-20190106144839-af01ea7f8024/go.mod h1:6v2b51hI/fHJwM22ozAgKL4VKDeJcHhJFhtBdhmNjmU=
github.com/jstemmer/go-junit-report v0.9.1/go.mod h1:Brl9GWCQeLvo8nXZwPNNblvFj/XSXhF0NWZEnDohbsk=
github.com/jtolds/gls v4.20.0+incompatible h1:xdiiI2gbIgH/gLH7ADydsJ1uDOEzR8yvV7C0MuV77Wo=
github.com/jtolds/gls v4.20.0+incompatible/go.mod h1:QJZ7F/aHp+rZTRtaJ1ow/lLfFfVYBRgL+9YlvaHOwJU=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a h1:FaWFmfWdAUKbSCtOU2QjDaorUexogfaMgbipgYATUMU=
github.com/juju/ansiterm v0.0.0-20180109212912-720a0952cc2a/go.mod h1:UJSiEoRfvx3hP73CvoARgeLjaIOjybY9vj8PUPPFGeU=
github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck=
github.com/kr/pretty v0.1.0/go.mod h1:dAy3ld7l9f0ibDNOQOHHMYYIIbhfbHSm3C4ZsoJORNo=
github.com/kr/pty v1.1.1/go.mod h1:pFQYn66WHrOpPYNljwOMqo10TkYh1fy3cYio2l3bCsQ=
github.com/kr/text v0.1.0/go.mod h1:4Jbv+DJW3UT/LiOwJeYQe1efqtUx/iVham/4vfdArNI=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a h1:weJVJJRzAJBFRlAiJQROKQs8oC9vOxvm4rZmBBk0ONw=
github.com/lunixbochs/vtclean v0.0.0-20180621232353-2d01aacdc34a/go.mod h1:pHhQNgMf3btfWnGBVipUOjRYhoOsdGqdm/+2c2E2WMI=
github.com/manifoldco/promptui v0.8.0 h1:R95mMF+McvXZQ7j1g8ucVZE1gLP3Sv6j9vlF9kyRqQo=
github.com/manifoldco/promptui v0.8.0/go.mod h1:n4zTdgP0vr0S3w7/O/g98U+e0gwLScEXGwov2nIKuGQ=
github.com/mattn/go-colorable v0.0.9 h1:UVL0vNpWh04HeJXV0KLcaT7r06gOH2l4OW6ddYRUIY4=
github.com/mattn/go-colorable v0.0.9/go.mod h1:9vuHe8Xs5qXnSaW/c/ABM9alt+Vo+STaOChaDxuIBZU=
github.com/mattn/go-isatty v0.0.4 h1:bnP0vzxcAdeI1zdubAl5PjU6zsERjGZb7raWodagDYs=
github.com/mattn/go-isatty v0.0.4/go.mod h1:M+lRXTBqGeGNdLjl/ufCoiOlB5xdOkqRJdNxMWT7Zi4=
github.com/pmezard/go-difflib v1.0.0/go.mod h1:iKH77koFhYxTK1pcRnkKkqfTogsbg7gZNVY4sRDYZ/4=
github.com/prometheus/client_model v0.0.0-20190812154241-14fe0d1b01d4/go.mod h1:xMI15A0UPsDsEKsMN9yxemIoYk6Tm2C1GtYGdfGttqA=
@ -135,7 +126,9 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR @@ -135,7 +126,9 @@ github.com/rogpeppe/go-internal v1.3.0/go.mod h1:M8bDsm7K2OlrFYOpmOWEs/qY81heoFR
github.com/rudi9719/loggy v0.0.0-20201031035735-9438c484de9a h1:4rkaWoLCWOmra5Mw/dLAWjtDLT/+i5uTX1qhlMVL8WA=
github.com/rudi9719/loggy v0.0.0-20201031035735-9438c484de9a/go.mod h1:s1ANCN8bF6HwwTpJLR458MFVGua9oqKKDbph/2jptL4=
github.com/skratchdot/open-golang v0.0.0-20200116055534-eef842397966/go.mod h1:sUM3LWHvSMaG192sy56D9F7CNvL7jUJVXoqM1QKLnog=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d h1:zE9ykElWQ6/NYmHa3jpm/yHnI4xSofP+UP6SpjHcSeM=
github.com/smartystreets/assertions v0.0.0-20180927180507-b2de0cb4f26d/go.mod h1:OnSkiWE9lh6wB0YB77sQom3nweQdgAjqCqsofrRNTgc=
github.com/smartystreets/goconvey v1.6.4 h1:fv0U8FUIMPNf1L9lnHLvLhgicrIVChEkdzIKYqbNC9s=
github.com/smartystreets/goconvey v1.6.4/go.mod h1:syvi0/a8iFYH4r/RixwvyeAJjdLS9QV7WQ/tjFTllLA=
github.com/stretchr/objx v0.1.0/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+wExME=
github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=
@ -208,7 +201,6 @@ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/ @@ -208,7 +201,6 @@ golang.org/x/net v0.0.0-20200513185701-a91f0712d120/go.mod h1:qpuaurCH72eLCgpAm/
golang.org/x/net v0.0.0-20200520182314-0ba52f642ac2/go.mod h1:qpuaurCH72eLCgpAm/N6yyVIVM9cpaDIP3A8BGJEC5A=
golang.org/x/net v0.0.0-20200625001655-4c5254603344/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200707034311-ab3426394381/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20200822124328-c89045814202 h1:VvcQYSHwXgi7W+TpUR6A9g6Up98WAHf3f/ulnJ62IyA=
golang.org/x/net v0.0.0-20200822124328-c89045814202/go.mod h1:/O7V0waA8r7cgGh81Ro3o1hOxt32SMVPicZroKQ2sZA=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e h1:XpT3nA5TvE525Ne3hInMh6+GETgn27Zfm9dxsThnX2Q=
golang.org/x/net v0.0.0-20210614182718-04defd469f4e/go.mod h1:9nx3DQGgdP8bBQD5qxJ1jj9UTztislL4KSBs9R2vV5Y=
@ -252,7 +244,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w @@ -252,7 +244,6 @@ golang.org/x/sys v0.0.0-20200501052902-10377860bb8e/go.mod h1:h1NjWce9XRLGQEsW7w
golang.org/x/sys v0.0.0-20200511232937-7e40ca221e25/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200515095857-1151b9dac4a9/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200523222454-059865788121/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642 h1:B6caxRw+hozq68X2MY7jEpZh/cr4/aHLv9xU8Kkadrw=
golang.org/x/sys v0.0.0-20200803210538-64077c9b5642/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20201119102817-f84b799fce68/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
golang.org/x/sys v0.0.0-20210423082822-04245dca01da/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
@ -310,6 +301,7 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc @@ -310,6 +301,7 @@ golang.org/x/tools v0.0.0-20200825202427-b303f430e36d/go.mod h1:njjCfa9FT2d7l9Bc
golang.org/x/xerrors v0.0.0-20190717185122-a985d3407aa7/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191011141410-1b5146add898/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20191204190536-9bdfabe68543/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1 h1:go1bK/D/BFZV2I8cIQd1NKEZ+0owSTG1fDTci4IqFcE=
golang.org/x/xerrors v0.0.0-20200804184101-5ec99f83aff1/go.mod h1:I/5z698sn9Ka8TeJc9MKroUUfqBBauWjQqLJ2OPfmY0=
google.golang.org/api v0.4.0/go.mod h1:8k5glujaEP+g9n7WNsDg8QP6cUVNI86fCNMcbazEtwE=
google.golang.org/api v0.7.0/go.mod h1:WtwebWUNSVBH/HAw79HIFXZNqEvBhG+Ra+ax0hx3E3M=

25
login.go

@ -5,22 +5,33 @@ import ( @@ -5,22 +5,33 @@ import (
"encoding/json"
"github.com/bogosj/tesla"
"golang.org/x/oauth2"
)
func noDevice(ctx context.Context, devices []tesla.Device) (d tesla.Device, passcode string, err error) {
return tesla.Device{}, "", nil
}
func login(ctx context.Context, username string, password string) (string, error) {
client, err := tesla.NewClient(
ctx,
tesla.WithMFAHandler(noDevice),
tesla.WithCredentials(username, password),
)
func login(ctx context.Context, username string, password string, tok string) (string, error) {
var client *tesla.Client
var err error
if tok != "" {
client, err = tesla.NewClient(
ctx,
tesla.WithToken(&oauth2.Token{
RefreshToken: tok,
}),
)
} else {
client, err = tesla.NewClient(
ctx,
tesla.WithMFAHandler(noDevice),
tesla.WithCredentials(username, password),
)
}
if err != nil {
log.LogErrorType(err)
return "", err
}
t, err := client.Token()
if err != nil {
log.LogErrorType(err)

19
main.go

@ -32,18 +32,29 @@ func main() { @@ -32,18 +32,29 @@ func main() {
ChatHandler: &chat,
}
setupCommands()
cmds := keybase.AdvertiseCommandsOptions{
Alias: "Tesla Bot",
}
var adCmds []chat1.UserBotCommandInput
for _, v := range commands {
cmds.Advertisements = append(cmds.Advertisements, v.Advert)
adCmds = append(adCmds, v.Advert.Commands...)
}
ads := chat1.AdvertiseCommandAPIParam{
Typ: "public",
Commands: adCmds,
}
cmds := keybase.AdvertiseCommandsOptions{
Alias: "Tesla Bot",
Advertisements: []chat1.AdvertiseCommandAPIParam{ads},
}
k.AdvertiseCommands(cmds)
k.Run(handlers, &keybase.RunOptions{})
}
func handleChat(m chat1.MsgSummary) {
defer log.PanicSafe()
if m.Content.TypeName != "text" {
return
}
parts := strings.Split(m.Content.Text.Body, " ")
command := strings.Replace(parts[0], "!", "", -1)
for _, v := range commands {

204
teslabot.log

@ -1,204 +0,0 @@ @@ -1,204 +0,0 @@
[22May21 08:04:04.903] Error: 5b28f252-5ee4-4b02-a5a9-606dbab7f3df: unexpected status code 401
[22May21 08:04:05.2948] Error: 15e567c9-42fc-4e83-82ec-11af225d3b77: unexpected status code 401
[22May21 08:04:06.3511] Error: 0429dff6-80da-454d-a302-fd6459c5ca78: unexpected status code 401
[22May21 08:04:06.4625] Error: e1373512-44b8-4b5a-a857-5345cf2dfe78: unexpected status code 401
[22May21 08:04:06.7508] Error: a7ba3013-fba5-4ec5-9786-5fb69679873f: unexpected status code 401
[22May21 08:04:06.8095] Error: 523db61b-4a19-43e9-bee7-03c278c035bd: `entryValue` field required
[22May21 08:04:07.152] Error: ec937316-5486-4dd5-afce-00f1a93047a9: unexpected status code 401
[22May21 08:04:07.1635] Error: 68f09c45-43ed-48b3-ae79-38eceaba5d04: `entryValue` field required
[22May21 08:04:07.8906] Error: 66f653e4-b082-45b7-afaf-a2c1a1be73d0: `entryValue` field required
[22May21 08:04:07.9731] Error: 7b3a9838-2d3e-457a-8df2-25ccca0e961d: unexpected status code 401
[22May21 08:04:08.1978] Error: 6a724106-a0a8-401a-b568-b2e13e222741: `entryValue` field required
[22May21 08:04:08.2162] Error: d3361831-6b20-4482-839b-deaceab26d84: `entryValue` field required
[22May21 08:04:08.3898] Error: 9be2e672-f46d-4c83-b978-217f4346d23d: unexpected status code 401
[22May21 08:04:08.4751] Error: 45c578a2-e411-4fa0-87c4-301714b303b2: `entryValue` field required
[22May21 08:04:08.7995] Error: 5afa3d71-114e-4a3c-827e-586a2681a965: unexpected status code 401
[22May21 08:04:08.9817] Error: 2a1de83b-b985-46fe-8e36-d16358791541: `entryValue` field required
[22May21 08:04:09.3179] Error: ff452ad9-2569-4fa6-904f-21eaac882938: unexpected status code 401
[22May21 08:04:09.3201] Error: 738cb5eb-c92c-4154-b67b-1bd21693d8ea: unexpected status code 401
[22May21 08:04:09.3227] Error: 0f752c32-302b-4fbc-979d-217453e71a9a: `entryValue` field required
[22May21 08:04:09.4634] Error: a640255a-4791-493f-91c6-ae1d6d3cf03f: unexpected status code 401
[22May21 08:04:09.5994] Error: 7bfca02c-dc15-4396-a428-b42c9004f72e: unexpected status code 401
[22May21 08:04:10.0394] Error: 830871d5-dedb-4ea5-b0dc-2b045fc1b7e5: unexpected status code 401
[22May21 08:04:10.1867] Error: 4e530735-627d-42dc-8a3e-6976aa4b2d3b: `entryValue` field required
[22May21 08:04:10.4266] Error: 4f45325c-f478-4622-bd7c-7f026defc768: unexpected status code 401
[22May21 08:04:10.4863] Error: f10e7c69-7ea5-4945-8f7c-a726f7a030ac: unexpected status code 401
[22May21 08:04:10.6332] Error: c947ff6a-04b3-4538-89aa-e99ab6bc182e: `entryValue` field required
[22May21 08:04:10.714] Error: d83a4f5f-d5f3-4664-aa05-bcf6b14744c6: `entryValue` field required
[22May21 08:04:10.8452] Error: 7c31495c-c7be-4108-9c20-60889cf5e6ba: unexpected status code 401
[22May21 08:04:11.047] Error: eb085d7e-fa68-40f2-86cc-fb0e3e6a4ec0: unexpected status code 401
[22May21 08:04:11.0508] Error: 142f650e-1799-4339-982a-fca4b3736eab: unexpected status code 401
[22May21 08:04:11.1732] Error: c3e495ac-514f-402e-8265-446947fc07f3: `entryValue` field required
[22May21 08:04:11.2856] Error: 6995514b-5f1f-49db-83f9-acbf3d9aa134: `entryValue` field required
[22May21 08:04:11.3434] Error: 301d97f2-2e5d-43e2-9207-201c0de3793f: `entryValue` field required
[22May21 08:04:11.3438] Error: 00a87d59-1e4c-4dda-af8e-4527e45dd491: unexpected status code 401
[22May21 08:04:11.4097] Error: 957a3f3d-ef7b-4f5d-a7cb-1a90f09fcf7b: unexpected status code 401
[22May21 08:04:11.6699] Error: ea27d189-55ec-4a30-a11b-47f707c5ef49: unexpected status code 401
[22May21 08:04:11.9539] Error: 4c051699-a189-40c5-93f9-8967bac24128: `entryValue` field required
[22May21 08:04:12.1511] Error: 3e3fa20d-177e-476b-9e3e-18fad3f6b654: `entryValue` field required
[22May21 08:04:12.1683] Error: 0450929c-c801-40b6-b6b6-c3fccd8e5141: `entryValue` field required
[22May21 08:04:12.652] Error: 36e5bca7-9e99-4a60-b22c-b45db92c7a69: unexpected status code 401
[22May21 08:04:13.0513] Error: 4059034f-6a92-4f90-91c6-18ae9577ab1b: unexpected status code 401
[22May21 08:04:13.0512] Error: 842c1a2a-b88e-42f5-b82e-6dd621854c60: `entryValue` field required
[22May21 08:04:13.1868] Error: e0f213d9-33b1-46cb-b71c-385c8493681a: `entryValue` field required
[22May21 08:04:13.3091] Error: 8268e1b4-13e8-4757-aa6b-e631fb0dcce2: `entryValue` field required
[22May21 08:04:13.5326] Error: f36f8584-b6a0-483d-b121-577f73214768: `entryValue` field required
[22May21 08:04:13.8462] Error: ed4f2d3e-9136-4fe7-8b62-9d3028b574ab: `entryValue` field required
[22May21 08:04:14.0541] Error: 8d42cf43-f3f2-45ad-9b6d-4361ff0889e5: unexpected status code 401
[22May21 08:04:14.1291] Error: 806f8a2b-515b-48f1-b2aa-ad82af0edd8d: unexpected status code 401
[22May21 08:04:14.1997] Error: 48567674-9004-4721-a111-e086198ebcd7: `entryValue` field required
[22May21 08:04:14.2287] Error: b8339d11-4ce5-4ff1-8ba1-8a851c6c9a6c: unexpected status code 401
[22May21 08:04:14.3373] Error: fdd7046a-913e-4fa7-bca8-e6b4746014ef: unexpected status code 401
[22May21 08:04:14.7321] Error: ead1705b-5ed7-4462-a26b-b70a2610a113: `entryValue` field required
[22May21 08:04:15.2247] Error: 59d42772-1de2-4f8a-9d0a-a4e5de4b3679: unexpected status code 401
[22May21 08:04:15.4134] Error: 9a658435-d7a6-420a-b70a-bb9d929ff682: unexpected status code 401
[22May21 08:04:15.6586] Error: 3f121735-8d5c-4df4-bb83-2087ea4676cc: unexpected status code 401
[22May21 08:04:15.7697] Error: 4caf7648-3bfb-4f95-8513-48a48060d131: `entryValue` field required
[22May21 08:04:15.7767] Error: 93f006a8-e262-4346-a46d-4a7e11f9231f: `entryValue` field required
[22May21 08:04:15.8586] Error: 4947ac81-20df-4769-8a3f-81a85b87d5b3: `entryValue` field required
[22May21 08:04:16.0417] Error: aecb08c7-f08c-486c-8002-50303e18c168: unexpected status code 401
[22May21 08:04:16.0513] Error: 34838ff5-4f2a-45c2-8058-05bf4137ae59: unexpected status code 401
[22May21 08:04:16.1437] Error: f07ce54d-1703-4333-ada9-149c60d35cd9: `entryValue` field required
[22May21 08:04:16.4105] Error: 7061885e-bfdd-4f5b-9f6e-91d006e02cdc: unexpected status code 401
[22May21 08:04:16.4756] Error: f53e003e-164d-4aa1-b9d9-54105d707222: unexpected status code 401
[22May21 08:04:16.7838] Error: 92706ff6-cfa4-42e2-b601-ffac17b0e345: `entryValue` field required
[22May21 08:04:16.8494] Error: 63141702-102a-49ae-930e-3a79f6708fe8: `entryValue` field required
[22May21 08:04:16.9124] Error: 1b35f37c-2481-41f2-8baf-df29323e84ca: `entryValue` field required
[22May21 08:04:17.2024] Error: e548ecb9-9679-4a56-b3fa-b4d581bac087: unexpected status code 401
[22May21 08:04:17.2276] Error: b57d1e38-bb79-41d5-b0c7-3c6db6568139: `entryValue` field required
[22May21 08:04:17.2296] Error: 00973952-dd84-4b21-92b9-6051f3d7754e: `entryValue` field required
[22May21 08:04:17.733] Error: e0fea769-89cc-47cb-b5ac-43015afc82fb: `entryValue` field required
[22May21 08:04:18.1309] Error: bb1b9b38-e176-4806-a10a-7de52d78aa33: unexpected status code 401
[22May21 08:04:18.1397] Error: 0ca28a8d-9824-4ca1-9b97-be558945777f: `entryValue` field required
[22May21 08:04:18.2521] Error: 21300b64-5ba3-4758-b47a-d2d0be4000ba: unexpected status code 401
[22May21 08:04:18.2996] Error: bd5ca158-b042-4e06-9168-b714009d37b1: unexpected status code 401
[22May21 08:04:18.5609] Error: 03ef7fd0-4b1c-49f3-8584-04b842e89627: unexpected status code 401
[22May21 08:04:18.8334] Error: a81ca7e9-4cc8-4d57-8f3c-739483584729: unexpected status code 401
[22May21 08:04:18.9205] Error: 6ddeae3d-ca5b-49f2-bcfd-d7a3dc782c4e: `entryValue` field required
[22May21 08:04:19.1938] Error: c2800e7e-132b-4a60-8ce0-575417fd4338: unexpected status code 401
[22May21 08:04:19.2947] Error: 796e5b27-5a55-4673-862e-ce61ba3a8494: `entryValue` field required
[22May21 08:04:19.4857] Error: e77e49e1-d81d-45d4-9052-bca1f17433a7: unexpected status code 401
[22May21 08:04:19.6373] Error: a35514d2-c4a6-46c5-82c1-01201e386cc4: `entryValue` field required
[22May21 08:04:19.6858] Error: cc6545ab-0240-41f5-96f6-0a63b06b4050: `entryValue` field required
[22May21 08:04:19.8855] Error: 2bb5c45c-3a42-4c6a-a4e6-834782bbb92b: `entryValue` field required
[22May21 08:04:19.8875] Error: f4d134e5-e592-4f5b-8e3e-cb7823f99623: `entryValue` field required
[22May21 08:04:19.8878] Error: b81e4c02-96e1-44b1-be37-c07381fb4432: unexpected status code 401
[22May21 08:04:20.3426] Error: dbd34ea2-04cf-4b6b-86bc-165366cf0ed2: unexpected status code 401
[22May21 08:04:20.4187] Error: fc0cf746-b870-4ef8-b528-99b0d89b82cf: `entryValue` field required
[22May21 08:04:20.5129] Error: 89337a6a-a463-46c1-9b83-2425146b1bc1: `entryValue` field required
[22May21 08:04:20.5554] Error: 176bc5ed-db07-4faf-a28e-f847e2e61ede: unexpected status code 401
[22May21 08:04:20.6278] Error: 644252a1-7f71-47a2-a5f1-ac88d8243ed8: unexpected status code 401
[22May21 08:04:20.8296] Error: 52bdcfb5-c78c-41e3-8750-7c2527690087: unexpected status code 401
[22May21 08:04:20.9083] Error: 1c2ea14f-a53e-4536-a15e-a707f866a286: unexpected status code 401
[22May21 08:04:20.9927] Error: d332ce99-bac2-45dc-8062-40300930934e: unexpected status code 401
[22May21 08:04:21.3501] Error: bce5132f-9054-4a8f-ae20-5dcfff26e81b: unexpected status code 401
[22May21 08:04:21.8172] Error: ada267fe-8ada-4209-ba2a-6d700ba12f20: `entryValue` field required
[22May21 08:04:21.8214] Error: 1b1feab6-c1c6-4177-9807-78a46ad2e507: `entryValue` field required
[22May21 08:04:21.85] Error: 28aacd7d-1d4f-43b2-a005-53013449cbeb: `entryValue` field required
[22May21 08:04:21.8953] Error: e39e5fa6-e880-4d03-8eb9-7edf794c956c: unexpected status code 401
[22May21 08:04:22.2287] Error: da6b1842-5a0e-4195-b10e-769b61cd447f: unexpected status code 401
[22May21 08:04:22.3213] Error: b7e61cc1-f341-4e98-9baa-d9c394c4f6bc: `entryValue` field required
[22May21 08:04:22.3481] Error: f0c939f7-1002-48ba-8ad0-7785199fe681: `entryValue` field required
[22May21 08:04:22.3812] Error: 5fca1990-39ad-4b2b-b85f-fe4c0b86ea4d: unexpected status code 401
[22May21 08:04:22.5924] Error: f58143e8-0915-4d5b-a32c-4a3cc84eae93: `entryValue` field required
[22May21 08:04:22.6126] Error: 9a4bd03c-0d1f-482b-b4d1-1bc2a5f7c053: `entryValue` field required
[22May21 08:04:22.7092] Error: f0a649ff-d180-4634-8c93-734a95e6fd78: `entryValue` field required
[22May21 08:04:22.9431] Error: f77ef3b6-aa23-43fa-84de-3fb91bb3a647: `entryValue` field required
[22May21 08:04:23.0308] Error: c81de30e-228b-45f5-a15b-4672142becfe: unexpected status code 401
[22May21 08:04:23.2222] Error: 3016b92b-c9a7-44ff-abc0-04e88ce4fdb2: `entryValue` field required
[22May21 08:04:23.291] Error: 403f7030-d98a-4092-990c-05c172aab406: `entryValue` field required
[22May21 08:04:23.4231] Error: 1fa9659f-028d-4db2-9b92-c857b71d9080: unexpected status code 401
[22May21 08:04:23.6583] Error: d0ecba27-f7f4-49e5-825a-77f5498c244d: unexpected status code 401
[22May21 08:04:23.7263] Error: 10e62aa1-6ac9-4826-a09d-3e1208dbe136: `entryValue` field required
[22May21 08:04:23.9075] Error: 420bf2eb-2a0d-4f09-ae8b-189686e663d7: unexpected status code 401
[22May21 08:04:23.9906] Error: 92de72a9-14de-44ae-9148-7fa0a5933293: unexpected status code 401
[22May21 08:04:24.6139] Error: a7fcff19-b0fc-4168-ba12-b089cd0077b0: `entryValue` field required
[22May21 08:04:24.6199] Error: 038a8217-5217-4fb0-8b2c-e1e1a913ba0b: `entryValue` field required
[22May21 08:04:24.7643] Error: 14fce671-cb22-4d6a-8b78-e1ffb740a8d5: unexpected status code 401
[22May21 08:04:24.9627] Error: 1c565eb9-8207-4145-befa-6bd88d28cfc0: unexpected status code 401
[22May21 08:04:25.2114] Error: 92ce95fa-7c6d-466f-9cd1-25e445ff999a: unexpected status code 401
[22May21 08:04:25.2432] Error: c310fa79-d6d6-4ea4-9c67-8e3aa7def9e3: `entryValue` field required
[22May21 08:04:25.2533] Error: cb754152-c6be-4b7a-bc6f-db3a6b036d36: unexpected status code 401
[22May21 08:04:25.2854] Error: 2df5d746-3454-4966-b4c0-64d0e11ed0a4: unexpected status code 401
[22May21 08:04:25.3891] Error: a102347d-114e-4697-aa73-be23b3920bf7: unexpected status code 401
[22May21 08:04:25.8104] Error: 220dddd1-7bae-4b25-ac99-2096d0f0c5f0: unexpected status code 401
[22May21 08:04:25.9043] Error: 89774326-b076-4c17-9033-7319a1023dad: `entryValue` field required
[22May21 08:04:26.0876] Error: ff991a2f-8d2c-4ef6-a0b5-9b9a387f7337: unexpected status code 401
[22May21 08:04:26.2764] Error: 3d42065e-f2c8-4337-a8d4-936407c94d84: `entryValue` field required
[22May21 08:04:26.28] Error: 455b222c-8c9c-48f0-80ab-0fbc437a88ed: `entryValue` field required
[22May21 08:04:26.3721] Error: 5b9a6e4b-0aa1-46df-b88a-6da624b57175: `entryValue` field required
[22May21 08:04:26.4735] Error: cb3d51e2-dbba-44ae-9228-4b2052631851: `entryValue` field required
[22May21 08:04:26.5527] Error: c20d1ecf-5a9a-4887-a204-1dbf14a8c87e: `entryValue` field required
[22May21 08:04:26.6255] Error: 7cc3c66b-af6d-45af-8878-04d44693d0ff: `entryValue` field required
[22May21 08:04:26.8414] Error: f66ebe4a-3ed7-4657-aeed-f3e3944d61b8: `entryValue` field required
[22May21 08:04:26.863] Error: 0f18df13-ea6c-46d0-93a9-e335535209e2: `entryValue` field required
[22May21 08:04:27.0293] Error: cc9331ee-07c4-4ad2-b3ba-2efc160bd6bd: unexpected status code 401
[22May21 08:04:27.2135] Error: 1d6ba5da-9c87-40ef-8808-652342159877: unexpected status code 401
[22May21 08:04:27.4219] Error: e1824432-74cd-418c-9afe-f63056ef3170: unexpected status code 401
[22May21 08:04:27.4946] Error: 49e1b2d0-6c3f-4bf0-8436-b1f0e425b3c4: unexpected status code 401
[22May21 08:04:27.7729] Error: 3a0c1673-96cc-4471-b55a-10929cec4e6f: `entryValue` field required
[22May21 08:04:27.803] Error: cd941821-5433-47e5-a400-32d4b33c944d: unexpected status code 401
[22May21 08:04:27.8636] Error: 640423e8-7e92-46e6-819c-f02bd588c348: unexpected status code 401
[22May21 08:04:28.0967] Error: dc626911-24ad-4ee2-858c-df1096dca645: unexpected status code 401
[22May21 08:04:28.1913] Error: efdd610b-806a-4f4c-9984-2950f89e046e: unexpected status code 401
[22May21 08:04:28.1938] Error: c736f1f6-1c93-4733-abab-7963d10f7e37: unexpected status code 401
[22May21 08:04:28.1952] Error: 68879ed5-7e7b-409f-8722-881371f4732d: `entryValue` field required
[22May21 08:04:28.2928] Error: 4ddd1911-5ffb-4762-b190-38bb8c75cd22: `entryValue` field required
[22May21 08:04:28.6377] Error: 7b5b19c2-cb99-4e2f-a36e-520ede1bd7bc: `entryValue` field required
[22May21 08:04:28.6593] Error: c816fbaf-431a-4501-a997-c110927fe43e: `entryValue` field required
[22May21 08:04:28.779] Error: 8e74db37-b3e7-406d-8216-1c42fd31ed23: `entryValue` field required
[22May21 08:04:28.9678] Error: ede51021-625e-4a99-9685-4a606139dc72: `entryValue` field required
[22May21 08:04:28.9921] Error: 139af1af-3102-48bc-a68f-7d64992c498b: `entryValue` field required
[22May21 08:04:29.1062] Error: f0198c96-2224-431c-8905-229f858c6efd: unexpected status code 401
[22May21 08:04:29.2476] Error: eb72cd8b-737c-4b60-ab30-4a760fcda166: unexpected status code 401
[22May21 08:14:54.5887] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 08:14:54.5889] Critical: Optional panic data: %!v(MISSING)
[22May21 08:14:55.4534] Critical: Optional panic data: %!v(MISSING)
[22May21 08:14:55.4535] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 08:14:59.0527] Critical: Panic detected: runtime error: index out of range [2] with length 2
[22May21 08:14:59.0527] Critical: Optional panic data: %!v(MISSING)
[22May21 08:14:59.2922] Critical: Panic detected: runtime error: index out of range [2] with length 2
[22May21 08:14:59.2922] Critical: Optional panic data: %!v(MISSING)
[22May21 08:14:59.7308] Critical: Panic detected: runtime error: index out of range [2] with length 2
[22May21 08:14:59.7308] Critical: Optional panic data: %!v(MISSING)
[22May21 08:15:00.1232] Critical: Optional panic data: %!v(MISSING)
[22May21 08:15:00.1232] Critical: Panic detected: runtime error: index out of range [2] with length 2
[22May21 08:15:01.1209] Error: 8e9baa9e-a4c6-4585-b915-acc0231e5af8: unexpected status code 401
[22May21 08:15:01.1721] Critical: Panic detected: runtime error: index out of range [2] with length 2
[22May21 08:15:01.1723] Critical: Optional panic data: %!v(MISSING)
[22May21 08:15:01.1977] Error: 456dfcd7-2d1d-450a-8263-160382e4ad6e: unexpected status code 401
[22May21 08:15:01.2404] Error: ba996127-05db-458f-bbe5-fe72372b9b72: unexpected status code 401
[22May21 08:15:01.6307] Error: 4d841e6c-b788-4d81-993c-6f18d3cb8d13: unexpected status code 401
[22May21 08:15:02.5707] Critical: Panic detected: runtime error: index out of range [2] with length 2
[22May21 08:15:02.5708] Critical: Optional panic data: %!v(MISSING)
[22May21 08:15:03.5002] Error: 7949cc34-b1cf-4adc-b830-2616a021a11a: `entryValue` field required
[22May21 08:15:03.5584] Error: 239f1640-3122-403e-909f-87df971ee31a: `entryValue` field required
[22May21 08:15:03.5828] Error: e417c1a4-4897-40f6-94af-c1c22fbe9070: `entryValue` field required
[22May21 08:15:03.9081] Critical: Panic detected: runtime error: index out of range [2] with length 2
[22May21 08:15:03.9081] Critical: Optional panic data: %!v(MISSING)
[22May21 08:15:03.961] Error: f0a576bc-5e6b-4f6b-8b15-b206ea7146df: `entryValue` field required
[22May21 08:15:04.4733] Error: b4010ca8-bc29-4c4d-aff8-9ed71553b0b0: unexpected status code 401
[22May21 08:16:08.3098] Error: 05f66d9e-ed7b-4a0e-9e66-0b8167970822: unexpected status code 401
[22May21 08:16:08.5805] Error: 315d3067-7b2f-45ff-8cee-d7da9cfa3f3b: `entryValue` field required
[22May21 08:17:50.7406] Critical: Optional panic data: %!v(MISSING)
[22May21 08:17:50.7407] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 08:21:22.4875] Debug: Token created for rudi9719
[22May21 08:21:23.1959] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 08:21:23.1958] Critical: Optional panic data: %!v(MISSING)
[22May21 08:24:34.1008] Critical: Optional panic data: %!v(MISSING)
[22May21 08:24:34.1008] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 08:24:40.75] Debug: Token created for rudi9719
[22May21 08:24:41.3495] Critical: Optional panic data: %!v(MISSING)
[22May21 08:24:41.3496] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 08:24:41.6306] Critical: Optional panic data: %!v(MISSING)
[22May21 08:24:41.6307] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 08:24:51.7027] Critical: Optional panic data: %!v(MISSING)
[22May21 08:24:51.7026] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 09:53:43.3098] Debug: Token created for rudi9719
[22May21 09:53:43.9497] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 09:53:43.9497] Critical: Optional panic data: %!v(MISSING)
[22May21 09:53:44.0814] Critical: Optional panic data: %!v(MISSING)
[22May21 09:53:44.0816] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 09:53:47.2925] Critical: Panic detected: runtime error: invalid memory address or nil pointer dereference
[22May21 09:53:47.2924] Critical: Optional panic data: %!v(MISSING)
[22May21 10:37:39.104] Debug: F
Loading…
Cancel
Save