From the course: Microsoft Teams Bot Development

Building the bot package

From the course: Microsoft Teams Bot Development

Building the bot package

- [Narrator] Now at this point I have bot written that understands two commands, about me, which works in a one on one chat, and getchannels, which needs to work in a team. I want to test getchannels. In order to test this, I need to side load my bot. And in order to side load the bot, I have to create a bot package. Well, let's see how we do that. I've already created a package because I didn't want to bore you with writing a bunch of json in front of you, but really, it's very simple. You see here that I created a folder called mybot, and inside here I've created two files. They're just png files in these dimensions. My artistic skills aren't great, so my icons are really simple. So I'll just open this in Microsoft Paint. And you see here that the icon that I'm using are simply a red square. Right, so nothing fancy. Of course, you can make this better. But the interesting part is in this manifest.json file. So let's see what's inside it. So the very top here, you want to mention the schema because it gives you intelesense and that's very helpful. ManifestVersion, version, and the ID of the bot, which is GUID for our bot, you give it a package name. This is similar to what iOS mobile applications do, com.your company name. an identifier for your bot. Give it some links and information, the basic information you need to provide. Give it a name that the users will see. A description. Icons, yes you do have to provide the icons. Accent color, this shows up at a different place. And then you specify what bots are inside this package. Now, this package is not unique to just bots. There are a number of other things that this package can deploy, various other Office 365 artifacts. Like in teams you could apply connectors, etc. It comes through the same package, but we just have a bot. So I have a bot ID. NeedsChannelSelector, true. NotificationOnly, false. And then I have two scopes here. Now, this is very interesting. This is sort of to help out the user. So when the user mentions a bot, you want to say that when your working in team, then we want to prompt user with getchannels. But when I'm in personal scope, then I want to prompt the user with aboutme. Simple as that. Give it some permissions, and give it some validDomains. We're still in dev mode, so I choose ngrok.io. Again, if you actually deploy this bot to some production site, then you would replace this with your production URL. That's it. This is how you create the bot package. All you need to do next is take these files and zip them up. So send to compressed folder, and let's call this mybot.zip. Next, we need to deploy this bot. Let's see that next.

Contents