<commit_before># Musicbot-Backend

[![Build status](https://ci.appveyor.com/api/projects/status/343h8hq0wkymm42i?svg=true)](https://ci.appveyor.com/project/kensykora/musicbot-backend)

## Deploying

App automatically deploys to dev on successful build. Deploy to prod by merging into `prod` branch<commit_msg>Documented slack setup<commit_after># Musicbot-Backend

[![Build status](https://ci.appveyor.com/api/projects/status/343h8hq0wkymm42i?svg=true)](https://ci.appveyor.com/project/kensykora/musicbot-backend)

## Slack App Setup for local development

1. Create a new slack app (<https://api.slack.com/>)
1. Setup Icon, Description, etc.
1. Add a slash command: `https://api.slack.com/apps/<your app id>/slash-commands`

    Command: `/mb[-suffix]` where `-suffix` is optionally a suffix to specifically identify you. Useful when multiple bots in the same server.  
    Request Url: `<Base URL>/api/command` (e.g., `https://music-bot-dev-app.azurewebsites.net/api/command`)  
    Description: Control your music  
    Usage Hint: play, pause  
    Escape Channels: `checked`

1. Invite your bot to the server: `https://api.slack.com/apps/<your app id>/install-on-team`
1. Start your functions host (Open Visual Studio solution, build and run)
1. Start your reverse proxy (download and install <https://ngrok.com/> client)
1. Update your slash command above with the base URL from ngrok.
1. Update your `src/func/local.settings.json` file with your App's Verification Token (retrieve from <https://api.slack.com/apps/<YOUR APP ID>/general> 
1. Start invoking commands.

For local development, recommend setting up your bot to trigger a URL via .
{'fraction_non_alphanumeric': 0.12371134020618557, 'fraction_numerical': 0.013947847180109158, 'mean_word_length': 4.339805825242719, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 10, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1100537', 'n_tokens_mistral': 549, 'n_tokens_neox': 522, 'n_words': 165}