Skip to content

Commit

Permalink
Merge pull request latitudegames#178 from TheNexusCity/spell_issue
Browse files Browse the repository at this point in the history
fixed spell issue
  • Loading branch information
rakeshghasadiya authored Jun 23, 2022
2 parents 07cf902 + 3b8d5f5 commit a001534
Showing 1 changed file with 28 additions and 12 deletions.
40 changes: 28 additions & 12 deletions client/src/workspaces/spells/windows/EntityWindow.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,12 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
useState('')
const [discord_spell_handler_update, setDiscordSpellHandlerUpdate] =
useState('')
const [discord_spell_handler_metadata, setDiscordSpellHandlerMetadata] = useState('')
const [discord_spell_handler_slash_command, setDiscordSpellHandlerSlashCommand] = useState('')
const [discord_spell_handler_metadata, setDiscordSpellHandlerMetadata] =
useState('')
const [
discord_spell_handler_slash_command,
setDiscordSpellHandlerSlashCommand,
] = useState('')

const [xrengine_spell_handler_incoming, setXREngineSpellHandlerIncoming] =
useState('')
Expand Down Expand Up @@ -128,7 +132,7 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
useState('')

const [twilio_enabled, setTwilioEnabled] = useState(false)
const [twilio_account_sid, setTwilioAccoundSID] = useState('')
const [twilio_account_sid, setTwilioAccountSID] = useState('')
const [twilio_auth_token, setTwilioAuthToken] = useState('')
const [twilio_phone_number, setTwilioPhoneNumber] = useState('')
const [twilio_bot_name, setTwilioBotName] = useState('')
Expand Down Expand Up @@ -237,7 +241,9 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
setDiscordSpellHandlerIncoming(res.data.discord_spell_handler_incoming)
setDiscordSpellHandlerUpdate(res.data.discord_spell_handler_update)
setDiscordSpellHandlerMetadata(res.data.discord_spell_handler_metadata)
setDiscordSpellHandlerSlashCommand(res.data.discord_spell_handler_slash_command)
setDiscordSpellHandlerSlashCommand(
res.data.discord_spell_handler_slash_command
)

setxrengine_enabled(res.data.xrengine_enabled === true)
setXREngineUrl(res.data.xrengine_url)
Expand Down Expand Up @@ -302,7 +308,7 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
)

setTwilioEnabled(res.data.twilio_enabled === true)
setTwilioAccoundSID(res.data.twilio_account_sid)
setTwilioAccountSID(res.data.twilio_account_sid)
setTwilioAuthToken(res.data.twilio_auth_token)
setTwilioPhoneNumber(res.data.twilio_phone_number)
setTwilioBotName(res.data.twilio_bot_name)
Expand Down Expand Up @@ -498,8 +504,12 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
setDiscordSpellHandlerUpdate(
responseData.discord_spell_handler_update
)
setDiscordSpellHandlerMetadata(responseData.discord_spell_handler_metadata)
setDiscordSpellHandlerSlashCommand(responseData.discord_spell_handler_slash_command)
setDiscordSpellHandlerMetadata(
responseData.discord_spell_handler_metadata
)
setDiscordSpellHandlerSlashCommand(
responseData.discord_spell_handler_slash_command
)

setXREngineSpellHandlerIncoming(
responseData.xrengine_spell_handler_incoming
Expand Down Expand Up @@ -1133,7 +1143,9 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
setDiscordSpellHandlerUpdate(event.target.value)
}}
>
<option value='null' selected>--Disabled--</option>
<option value="null" selected>
--Disabled--
</option>
{spellList.length > 0 &&
spellList.map((spell, idx) => (
<option value={spell.name} key={idx}>
Expand All @@ -1153,7 +1165,9 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
setDiscordSpellHandlerMetadata(event.target.value)
}}
>
<option value='null' selected>--Disabled--</option>
<option value="null" selected>
--Disabled--
</option>
{spellList.length > 0 &&
spellList.map((spell, idx) => (
<option value={spell.name} key={idx}>
Expand All @@ -1162,7 +1176,7 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
))}
</select>
</div>

<div className="form-item agent-select">
<span className="form-item-label">Slash Command Handler</span>
<select
Expand All @@ -1173,7 +1187,9 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
setDiscordSpellHandlerSlashCommand(event.target.value)
}}
>
<option value='null' selected>--Disabled--</option>
<option value="null" selected>
--Disabled--
</option>
{spellList.length > 0 &&
spellList.map((spell, idx) => (
<option value={spell.name} key={idx}>
Expand Down Expand Up @@ -1830,7 +1846,7 @@ const EntityWindow = ({ id, updateCallback, greetings }) => {
type="text"
defaultValue={twilio_account_sid}
onChange={e => {
setTwilioAccoundSID(e.target.value)
setTwilioAccountSID(e.target.value)
}}
/>
</div>
Expand Down

0 comments on commit a001534

Please sign in to comment.