Skip to content

Commit 52f9037

Browse files
committed
'fix': GetInteger (needs refactor)
1 parent c2477bc commit 52f9037

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

pkg/classes/BaseInteraction.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,10 @@ func (bi BaseInteraction) GetInteger(OptionName string) *int {
100100
}
101101
for _, o := range *bi.Data.Options {
102102
if *o.Name == OptionName {
103-
optionValue := *o.Value
104-
return optionValue.(*int)
103+
optionValue_ptr := *o.Value
104+
optionValue_float64 := optionValue_ptr.(*float64)
105+
optionValue_as_int := int(*optionValue_float64)
106+
return &optionValue_as_int
105107
}
106108
}
107109
return nil

0 commit comments

Comments
 (0)