cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
367
Views
0
Helpful
1
Replies

Getting an output on BOT based on user input

o1
Cisco Employee
Cisco Employee

Hi Team,

I am currently working on the Webex BOT to get an output based on the user input. I had used following format of the code to achieve some of my tasks:

class TestClass(Command
def __init__(self
super().__init__(
command_keyword="nonreach",
help_message="Get info & get ready",
card=None,
)

def execute(self, message, attachment_actions, activity
#deviceNames, ip_addresses = excel_read.read_Excel()
nonreach ="Test"
return nonreach
 
where I need to give input as "nonreach" on BOT & based on my backend code I return the output in "nonreach" & it gets displayed as an output on my BOT. My new requirement is to provide ip as an input. Eg : if I provide ip as 1.1.1.1, I should get the o/p, if the input is 8.8.8.8, I should get the dependable o/p etc.
 
How can I adjust the user defined inputs & get the o/ps based on my inputs? Any wiki's to refer would be of great help! 

 

1 Reply 1

Janos Benyovszki
Cisco Employee
Cisco Employee

@o1 is this an API query? Based on your description it just seems that you are trying to write a logic and have issues with that, but I do not see the connection to Webex or the APIs.