### Copy Example Environment File Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Copies the example environment file to be used for bot configuration. This is a necessary step before filling in the required values. ```sh cp env.example .env ``` -------------------------------- ### Start Development Server with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Starts the development server on port 3000. Use this for local development and testing. ```bash npm run dev # Start dev server on port 3000 ``` -------------------------------- ### Start Development Server Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/README.md Start the development server, which typically runs on port 3000. ```bash npm run dev ``` -------------------------------- ### Install Dependencies Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/web/README.md Install project dependencies using npm or pnpm. Ensure Node.js 18 or higher is installed. ```sh npm install # or pnpm install ``` -------------------------------- ### Run Development Server Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/web/README.md Start the Next.js development server. Access the dashboard at http://localhost:3000. ```sh npm run dev # or pnpm dev ``` -------------------------------- ### Install Node.js Dependencies Source: https://github.com/senchabot-opensource/monorepo/blob/dev/README.md Navigate to the web application directory and use npm or pnpm to install its dependencies. ```sh cd apps/web npm install # or pnpm install ``` -------------------------------- ### Install Project Dependencies Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/README.md Install project dependencies using npm. ```bash npm install ``` -------------------------------- ### Install Go Dependencies Source: https://github.com/senchabot-opensource/monorepo/blob/dev/README.md Run this command within a Go application directory to download necessary Go modules. ```sh go mod download ``` -------------------------------- ### Project Directory Structure Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Overview of the project's directory layout. Contains entrypoints, internal modules, environment examples, Docker configuration, and deployment settings. ```plaintext . ├── cmd/ # Entrypoint ├── internal/ # Commands, handlers, services ├── env.example # Example environment variables ├── Dockerfile # Container config ├── fly.toml # Deployment config └── README.md ``` -------------------------------- ### Start All Services with Docker Compose Source: https://github.com/senchabot-opensource/monorepo/blob/dev/README.md Execute this command from the monorepo root to launch PostgreSQL, pgAdmin, the web dashboard, Discord bot, and Twitch bot using Docker Compose. ```sh docker-compose up -d ``` -------------------------------- ### Clone Senchabot Repository Source: https://github.com/senchabot-opensource/monorepo/blob/dev/README.md Use this command to clone the monorepo locally. Navigate into the cloned directory to proceed with setup. ```sh git clone https://github.com/senchabot-opensource/monorepo.git cd monorepo ``` -------------------------------- ### Add Command Alias Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Creates an alias for an existing command, allowing a shortcut to trigger it. For example, `!acmda hello hi` makes `!hello` run `!hi`. ```sh !acmda ``` -------------------------------- ### Get Bot Invite URL Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Retrieve the OAuth2 invite URL for the bot, allowing users to add it to their Discord servers. ```discord-command /invite ``` -------------------------------- ### Build Project for Production Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/README.md Build the project for production deployment. ```bash npm run build ``` -------------------------------- ### Preview Production Build with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Previews the production build locally. Useful for verifying the production output before deployment. ```bash npm run preview # Preview production build ``` -------------------------------- ### Help Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Lists all available system commands provided by the bot. This is a general help command for users to understand bot functionalities. ```sh !help ``` -------------------------------- ### Build for Production with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Builds the project for production deployment. This command optimizes assets and code. ```bash npm run build # Build for production ``` -------------------------------- ### Lint and Format Code with Biome Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/README.md Use Biome for linting and formatting the project code. ```bash npm run lint ``` ```bash npm run format ``` ```bash npm run check ``` -------------------------------- ### List All Commands Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Display all available commands for the server, including system commands and custom commands. ```discord-command /cmds ``` -------------------------------- ### Run Project Tests Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/README.md Execute project tests using Vitest. ```bash npm run test ``` -------------------------------- ### List Commands Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Lists all available commands, including both custom and system-defined commands. This helps users discover available bot functionalities. ```sh !cmds ``` -------------------------------- ### Run Biome Formatter with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Applies code formatting using Biome. Ensures consistent code style across the project. ```bash npm run format # Run Biome formatter ``` -------------------------------- ### Run Biome Linter with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Runs the Biome linter to check for code style and potential errors. Helps maintain code consistency. ```bash npm run lint # Run Biome linter ``` -------------------------------- ### Run Vitest Tests with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Executes the project's tests using Vitest. This command is crucial for ensuring code quality. ```bash npm run test # Run Vitest tests ``` -------------------------------- ### Project Structure Overview Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt This tree outlines the directory structure for the Senchabot Extensions project, detailing the organization of routes, features, hooks, types, libraries, components, and configuration files. ```tree . ├── src/ │ ├── index.tsx # Widget and tool hub landing page │ ├── __root.tsx # Root layout with SEO meta tags │ ├── setup/ │ │ ├── sub-growing-plant.tsx # Sub Sprout configuration page │ │ ├── chat-widget.tsx # Universal Chat configuration page │ │ └── raffle.tsx # Raffle configuration page │ └── widgets/ │ ├── sub-sprout-widget.tsx # Sub Sprout overlay (Browser Source) │ ├── chat-widget.tsx # Universal Chat overlay (Browser Source) │ └── raffle-overlay.tsx # Raffle winner overlay (Browser Source) ├── src/features/widgets/ # Widget and tool logic and components │ ├── sub-sprout/ │ │ └── sub-sprout-widget.tsx │ ├── chat-widget/ │ │ ├── use-unified-chat.ts # Chat connection hook (Twitch IRC + Kick Pusher) │ │ ├── chat-messages.ts # Message parsing │ │ ├── use-badges.ts # Badge loading │ │ └── kick-badges.tsx # Kick badge SVGs │ └── raffle/ │ ├── raffle-widget.tsx # Raffle setup UI │ └── raffle-overlay.tsx # Winner announcement overlay ├── src/hooks/ │ ├── use-raffle-state.ts # localStorage-based raffle state │ └── use-raffle-chat.ts # Chat monitoring for raffle entries ├── src/types/ │ └── raffle.ts # Raffle type definitions ├── src/lib/ │ └── kick.ts # Kick-specific utilities ├── src/components/ │ └── breadcrumb.tsx # Navigation breadcrumb ├── src/styles.css # Tailwind CSS entry ├── src/router.tsx # TanStack Router setup ├── vite.config.ts # Vite + TanStack Router config ├── package.json └── README.md ``` -------------------------------- ### Deploy to Cloudflare Workers with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Deploys the project to Cloudflare Workers. Ensure your Cloudflare environment is configured. ```bash npm run deploy # Deploy to Cloudflare Workers ``` -------------------------------- ### Run Biome Check with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Performs a check using Biome, which may include linting and formatting checks. Use this for a comprehensive code quality assessment. ```bash npm run check # Run Biome check ``` -------------------------------- ### Deploy to Cloudflare Workers Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/README.md Deploy the project to Cloudflare Workers. ```bash npm run deploy ``` -------------------------------- ### Run Bot Standalone Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Runs the Senchabot Twitch Bot as a standalone application. This command is executed from the monorepo root directory. ```sh go run ./cmd/main ``` -------------------------------- ### Create Twitch Clip Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Creates a Twitch clip for the current stream and returns the URL of the created clip. This is useful for capturing highlights. ```sh !clip ``` -------------------------------- ### Enable Timer for Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Enables a repeating timer for a specific command. The interval is specified in minutes, and a maximum of 3 timers can be active per channel. ```sh !atimer ``` -------------------------------- ### List Active Timers Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Lists all currently active command timers for the channel. This provides an overview of automated commands. ```sh !timers ``` -------------------------------- ### Add Custom Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Create a new custom slash command for the server. The command name must be 1-32 characters, lowercase, and contain only letters, numbers, and hyphens. It is deployed immediately. ```discord-command /acmd ``` -------------------------------- ### Opt-in Message Tracking Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Enable Senchabot to track your message content. This is required for certain features that analyze user messages. ```discord-command /track-my-messages ``` -------------------------------- ### Generate Wrangler Types with npm Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/extensions/llms.txt Generates types for Wrangler, the Cloudflare Workers CLI. This is useful for improving type safety in your Cloudflare Worker code. ```bash npm run cf-typegen # Generate Wrangler types ``` -------------------------------- ### Add Custom Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Adds a new custom text command to the bot. Supports variables like {user}, {channel}, and {date} in the command content. ```sh !acmd ``` -------------------------------- ### Invite Bot to Channel Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Adds the bot to your Twitch channel and makes it join your chat. This command is typically used via whisper to the bot. ```sh !invite ``` -------------------------------- ### Set Custom Announcement Content Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Set a personalized announcement message for a specific Twitch streamer, overriding the default template. ```discord-command /set-twitch announcement custom-content ``` -------------------------------- ### Reset Announcement Content Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Revert the announcement message template to the bot's built-in default. ```discord-command /del-twitch announcement default-content ``` -------------------------------- ### Ping Bot Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md A simple command that pings the bot and expects a 'pong!' response. It's a basic way to check if the bot is online and responsive. ```sh !ping ``` -------------------------------- ### Set Default Announcement Channel Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Configure the default Discord text channel where all Twitch streamer announcements will be posted. ```discord-command /set-twitch announcement default-channel ``` -------------------------------- ### Filter Announcements by Category Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Apply a regex filter to announcements for a specific channel based on the stream category. Supports 'matches' or 'does not match' conditions. ```discord-command /set-twitch announcement category-filter ``` -------------------------------- ### List Tracked Streamers Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Display a list of all Twitch streamers currently configured to send announcements. ```discord-command /streamer-list ``` -------------------------------- ### Update Custom Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Updates the content of an existing custom command. This allows for modification of command responses. ```sh !ucmd ``` -------------------------------- ### Add Twitch Streamer Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Register a Twitch streamer to track for live announcements. The bot validates the streamer before adding. Optionally specify a Discord channel for announcements. ```discord-command /set-twitch streamer [channel] ``` -------------------------------- ### Set Default Announcement Content Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Define the default message template for Twitch stream announcements. Supports placeholders for streamer name, URL, stream category, and title. ```discord-command /set-twitch announcement default-content ``` -------------------------------- ### Update Custom Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Modify the content of an existing custom slash command. ```discord-command /ucmd ``` -------------------------------- ### Set Event Channel for Stream Announcements Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Designate a channel where Twitch announcements will also trigger the creation of a Discord Scheduled Event for the live stream. ```discord-command /set-twitch event-channel ``` -------------------------------- ### Opt-out Message Tracking Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Disable Senchabot's tracking of your message content. ```discord-command /do-not-track-my-messages ``` -------------------------------- ### Delete Custom Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Remove a custom slash command and its registration from the server. ```discord-command /dcmd ``` -------------------------------- ### Delete Custom Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Deletes a custom command from the bot's configuration. This is used to remove commands that are no longer needed. ```sh !dcmd ``` -------------------------------- ### Remove Default Announcement Channel Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Unset the default Discord text channel for streamer announcements. ```discord-command /del-twitch announcement default-channel ``` -------------------------------- ### Remove Category Filter Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Remove a previously set category filter for announcements in a specific channel. ```discord-command /del-twitch announcement category-filter ``` -------------------------------- ### Remove Event Channel Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Stop creating Discord Scheduled Events for Twitch announcements in a specified channel. ```discord-command /del-twitch event-channel ``` -------------------------------- ### Bulk Delete Messages Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Remove up to 100 messages from the last 14 days. Requires at least one filter for message content or username. This is a powerful moderation tool. ```discord-command /purge last-100-channel-messages [message-content] [username] ``` -------------------------------- ### Delete Command Alias Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Deletes a command alias, removing the shortcut for a command. This is useful for managing command access and organization. ```sh !dcmda ``` -------------------------------- ### Remove Custom Announcement Content Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Delete the personalized announcement message for a specific Twitch streamer. ```discord-command /del-twitch announcement custom-content ``` -------------------------------- ### Remove Bot from Channel Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Removes the bot from your Twitch channel and makes it leave your chat. This command can only be used by the broadcaster. ```sh !leave ``` -------------------------------- ### Disable Timer for Command Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Disables or deletes an active command timer. This stops the command from repeating automatically in the chat. ```sh !dtimer ``` -------------------------------- ### Purge Bot-Created Events Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Delete all Discord Scheduled Events that were created by the bot. ```discord-command /purge events ``` -------------------------------- ### Remove Twitch Streamer Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/discord-bot/README.md Stop receiving announcements for a specific Twitch streamer. ```discord-command /del-twitch streamer ``` -------------------------------- ### Shoutout Streamer Source: https://github.com/senchabot-opensource/monorepo/blob/dev/apps/twitch-bot/README.md Performs a Twitch shoutout for a specified streamer. The message format can be customized through the bot's settings. ```sh !so ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.