Skip to content

Commit 34a7ac3

Browse files
committed
''fix'': GetInteger() 'refactor?'
1 parent 52f9037 commit 34a7ac3

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

pkg/classes/BaseInteraction.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -101,9 +101,8 @@ func (bi BaseInteraction) GetInteger(OptionName string) *int {
101101
for _, o := range *bi.Data.Options {
102102
if *o.Name == OptionName {
103103
optionValue_ptr := *o.Value
104-
optionValue_float64 := optionValue_ptr.(*float64)
105-
optionValue_as_int := int(*optionValue_float64)
106-
return &optionValue_as_int
104+
optionValue := int(optionValue_ptr.(float64))
105+
return &optionValue
107106
}
108107
}
109108
return nil

0 commit comments

Comments
 (0)