Skip to content

Instantly share code, notes, and snippets.

@garrytrinder
Last active July 4, 2024 09:37
Show Gist options
  • Save garrytrinder/6e0629dcccfd135f6917ee2eb9b2fb26 to your computer and use it in GitHub Desktop.
Save garrytrinder/6e0629dcccfd135f6917ee2eb9b2fb26 to your computer and use it in GitHub Desktop.
Remove all bots from dev.botframework.com
// Remove all bots from your account
// 1. Go to https://dev.botframework.com/bots
// 2. Open the console (F12)
// 3. Paste the following code and press enter
(async () => {
// select the first bot element
let bot = document.querySelector('.bot-content > a');
while (bot) {
// click the element link
bot.click();
await new Promise(resolve => setTimeout(resolve, 3000));
// click the settings tab
document.querySelectorAll('.bot-tab-control-tab')[5].click();
document.querySelector('.delete-button').click();
document.querySelector('.ok-button').click();
await new Promise(resolve => setTimeout(resolve, 3000));
// click OK in the confirmation dialog
document.querySelector('.ok-button').click();
await new Promise(resolve => setTimeout(resolve, 200));
// sometimes there is a second confirmation dialog about unsaved changes
const yes = document.querySelector('.ok-button');
if (yes) { yes.click() }
await new Promise(resolve => setTimeout(resolve, 3000));
// select the next bot
bot = document.querySelector('.bot-content > a');
}
})();
@chenxizhang
Copy link

sometimes it fails but this is a good script, thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment