Feat: Add Discord Bot example project and improve Dependency Injection support#13
Merged
Conversation
Implemented a Discord bot to interact with TikTok videos, including metadata retrieval and video downloads. Added multiple CDN providers (Cloudflare R2, 0x0.st, Litterbox) for video uploads exceeding Discord's size limit. Key changes include: - Added `CloudflareR2CdnProvider`, `LitterboxCdnProvider`, and `ZeroXZeroCdnProvider` for CDN support. - Introduced `CompositeCdnProvider` to handle fallback between multiple CDNs. - Created `DownloadModule` and `VideoModule` for Discord interactions. - Added `BotService` and `InteractionHandlerService` for bot lifecycle and command handling. - Configured `appsettings.example.json` for bot and CDN settings. - Updated solution to include the new `TiktokExplode.Bot` project.
- Added `GuildId` property in `BotSettings` to enable instant command registration in specific servers for development. - Introduced `/audio` command in `VideoModule` to play TikTok video audio in voice channels using FFmpeg. - Updated `Program.cs` to enable `GuildVoiceStates` intent and added `ConcurrentDictionary` for managing audio clients. - Modified `InteractionHandlerService` to support guild-specific or global command registration based on `GuildId`. - Created `FFmpegAudioStream` class to handle FFmpeg processes for audio streaming with proper resource disposal. - Updated `appsettings.example.json` to include `GuildId` configuration with a default value of `0`.
Allows you to register an ISearchClient with UsePlaywrightSearch independently of the page fetcher, even when using HTTP. Added TiktokDownloadClient as a singleton to share cookies and avoid 403 errors. Improvements to search error handling, package version updates, added an icon to the metapackage, and internal visibility for testing. Minor refactoring for greater clarity.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.