import { createSlice , PayloadAction } from "@reduxjs/toolkit" ; interface BotState { ambition : number ; competency : number ; composure : number ; vision : number ; } const initialState = { ambition : 100 , competency : 100 , composure : 100 , vision : 100 } ; const { actions , reducer : botInfoReducer , } = createSlice ( { name : "botInfo" , initialState , reducers : { updateAmbitionCommand : ( state , { payload : ambitionValue } ) => ( { ... state , ambition : ambitionValue } ) , updateCompetencyCommand : ( state , { payload : competencyValue } ) => ( { ... state , competency : competencyValue } ) , updateComposureCommand : ( state , { payload : composureValue } ) => ( { ... state , composure : composureValue } ) , updateVisionCommand : ( state , { payload : visionValue } ) => ( { ... state , vision : visionValue } ) } } ) ; export { botInfoReducer , actions as botInfoActions } ;