Install Nimbella Commander
You can install directly by clicking here: Add Commander to Microsoft Teams
To complete the tutorial and create your own commands, you must have permission to install an app in Microsoft Teams. If you are Teams admin, you should have that permission. If you can't, you will need to contact your Teams admin to get permission to install Commander in Teams.
Test the installation
Run "@commander take a tour" in any Teams channel. This will invoke Commander and execute "take a tour" command.
In order to chat with Commander bot privately, go to chat, click on the edit button, add Commander and then type "take a tour". When interacting with Commander bot privately, you don't need to type @commander for every command.
Tutorial 1: Create your first command
Let's create a command. We'll explain these steps later on.
- Click on the Commander bot in Chat to interact with Commander.
- Create a print command
command create print
print , edit the code
- Change the source code for the print command to print the message by clicking on edit the code link
- Run the print command you just created.
You can click on the run print button or type run printUser 10:07 PM
run printCommander App 10:07 PM
This is a default response for a newly created command with text: print
- Ask Commander to list all custom commandsUser 10:07 PM
- Show a log of the print command you createdUser 10:07 PM
command log print
- Allow another user to run the print command. The commands for allowing access control to other users can only be executed in public channels. You will need to prefix the commands with @commander to run commands in public channels. (Refer: Ways to interact with Commander)User 10:07 PM
@commander command runners print + @user
Tutorial 2: Install a Command Set
Sets of commands can be installed using a command set manager (csm) command.
- Install the dig command set User 10:07 PM
csm install dig
- Run the dig command. It is part of the dig command set you just installed.User 10:07 PM
run dig yahoo.com
Ways to interact with Commander
- Using Commander in Public Channels
You can use Commander in Microsoft Teams in public channels by typing @commander and then a command. For example:
@commander run print
When you type @commander and press space, the @ sign should appear and "Commander" should change to a blue color. If it doesn't, then you likely have a channel or other name in Microsoft Teams that starts with the word "Commander".
Correct use: If you use @ to direct a message at someone in Microsoft teams, it will automatically set the recipient if you type the full name of that person or bot and then press space but only if that name is unique. (see below)
Incorrect use: If you type the full word "@commander" and a list with more than one option is present at the end and you press space, Teams will not automatically select an option for you and the @commander will appear with the @ sign, in its original color, and the command you type won't end up being sent to Commander (see below)
Because of this, in a public channel, it is best to start typing @commander and then hit Enter and select the Commander bot from the list that pops up to direct a message to Commander. This ensures the message will be directed at Commander in any case.
- Privately Chatting with Commander
You can also message the Commander bot directly in Chat. When interacting with Commander bot, you don't need to prefix a command with @commander, you can simply type the command.
If you are creating a command with parameters in the private Commander channel, you need to press Shift-Enter to create the command. Just pressing Enter will not create the command with parameters. This is not a bug but it is Microsoft Teams behavior. This is not required when creating commands in pubic channels.
- Using Commander in other Private Channels
Microsoft Teams does not support communicating with bots in a private channel that is not the bot's channel. Because of this, you can't issue a Commander command in a private channel that is between you and someone else.