{"id":29101679,"url":"https://github.com/blankparticle/discord-forum-threads-iteraator","last_synced_at":"2025-06-28T21:07:31.670Z","repository":{"id":300901529,"uuid":"1007521909","full_name":"BlankParticle/discord-forum-threads-iteraator","owner":"BlankParticle","description":null,"archived":false,"fork":false,"pushed_at":"2025-06-24T06:11:49.000Z","size":16,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-06-24T07:25:07.404Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/BlankParticle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-06-24T06:10:21.000Z","updated_at":"2025-06-24T06:11:53.000Z","dependencies_parsed_at":"2025-06-24T07:25:20.586Z","dependency_job_id":"19964020-971d-4e0d-85b3-d4653791705a","html_url":"https://github.com/BlankParticle/discord-forum-threads-iteraator","commit_stats":null,"previous_names":["blankparticle/discord-forum-threads-iteraator"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/BlankParticle/discord-forum-threads-iteraator","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlankParticle%2Fdiscord-forum-threads-iteraator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlankParticle%2Fdiscord-forum-threads-iteraator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlankParticle%2Fdiscord-forum-threads-iteraator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlankParticle%2Fdiscord-forum-threads-iteraator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/BlankParticle","download_url":"https://codeload.github.com/BlankParticle/discord-forum-threads-iteraator/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/BlankParticle%2Fdiscord-forum-threads-iteraator/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":262497259,"owners_count":23320297,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-06-28T21:07:28.970Z","updated_at":"2025-06-28T21:07:31.663Z","avatar_url":"https://github.com/BlankParticle.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Forum Threads Iterator - .NET Version\n\n## Prerequisites\n\n- .NET 9.0 SDK or later\n- A Discord bot token\n\n## Setup\n\n1. **Install .NET 9.0 SDK** if you haven't already:\n\n   - Download from: https://dotnet.microsoft.com/download/dotnet/9.0\n\n2. **Set your Discord bot token** as an environment variable:\n\n   ```bash\n   # On macOS/Linux\n   export DISCORD_TOKEN=\"your_discord_bot_token_here\"\n\n   # On Windows (Command Prompt)\n   set DISCORD_TOKEN=your_discord_bot_token_here\n\n   # On Windows (PowerShell)\n   $env:DISCORD_TOKEN=\"your_discord_bot_token_here\"\n   ```\n\n   Alternatively, you can create a `.env` file in the project root:\n\n   ```\n   DISCORD_TOKEN=your_discord_bot_token_here\n   ```\n\n## Running the Application\n\n1. **Restore dependencies**:\n\n   ```bash\n   dotnet restore\n   ```\n\n2. **Build the project**:\n\n   ```bash\n   dotnet build\n   ```\n\n3. **Run the application**:\n   ```bash\n   dotnet run\n   ```\n\n## Features\n\n- **Forum Thread Iterator**: Fetches Discord forum threads with pagination support\n- **Async Enumeration**: Uses C#'s `IAsyncEnumerable\u003cT\u003e` for efficient streaming of results\n- **Configuration Management**: Supports environment variables and JSON configuration\n- **Error Handling**: Comprehensive error handling for HTTP requests and JSON deserialization\n- **Interactive Console**: Press Enter to continue viewing threads, or Ctrl+C to exit\n\n## Project Structure\n\n- `Program.cs` - Main entry point and application logic\n- `ForumThreadsIterator.cs` - Core iterator class for fetching Discord threads\n- `Models/ThreadModels.cs` - C# model classes for Discord API responses\n- `DiscordBotPlay.csproj` - Project file with dependencies\n- `appsettings.json` - Configuration file\n\n## Dependencies\n\n- **Newtonsoft.Json** - JSON serialization/deserialization\n- **Microsoft.Extensions.Configuration** - Configuration management\n- **Microsoft.Extensions.Configuration.EnvironmentVariables** - Environment variable support\n- **Microsoft.Extensions.Configuration.Json** - JSON configuration support\n\n## API Endpoint\n\nThe application uses Discord's API v10 endpoint:\n\n```\nGET https://discord.com/api/v10/channels/{channelId}/threads/search\n```\n\n## Configuration Options\n\nThe `ForumThreadsIteratorOptions` class supports:\n\n- `ChannelId` - Discord channel ID to fetch threads from\n- `AfterId` - Optional thread ID to start fetching after (for pagination)\n- `Limit` - Number of threads to fetch per request (default: 25)\n- `Tag` - Optional tag filter\n- `SortOrder` - Sort order (\"asc\" or \"desc\")\n- `AuthToken` - Discord bot authorization token\n\n## Error Handling\n\nThe application handles various error scenarios:\n\n- Missing Discord token\n- HTTP request failures\n- JSON deserialization errors\n- Network connectivity issues\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankparticle%2Fdiscord-forum-threads-iteraator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fblankparticle%2Fdiscord-forum-threads-iteraator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fblankparticle%2Fdiscord-forum-threads-iteraator/lists"}