Add periodic poll feature for icebreaker/dilemma discussions#290
Open
Add periodic poll feature for icebreaker/dilemma discussions#290
Conversation
Copilot
AI
changed the title
[WIP] Add custom URL option for hosting polls
Add periodic poll feature for icebreaker/dilemma discussions
Feb 14, 2026
Owner
|
@copilot 1. /poll is fine. 2. copy to db perhaps ? 3. yaml is fine 4. yes 5. I don't see any value in that |
- Install js-yaml for YAML parsing support - Create PollItem model for storing poll questions - Create PollSchedule model for poll scheduling - Implement PollService with cron-based scheduling - Add /poll command with 8 subcommands (create, list, delete, test, add-item, list-items, delete-item, import-url) - URL import with YAML/JSON support - Smart poll rotation with cooldown tracking - Integration with Discord native poll API - Register poll command in CommandManager - Add poll configuration schema entries - Initialize poll service in main index Co-authored-by: lonix <2330355+lonix@users.noreply.github.com>
- Add /poll command documentation to COMMANDS.md with examples - Add poll configuration settings to SETTINGS.md - Include YAML/JSON format examples - Document all 8 subcommands - Explain smart poll rotation logic - Add use cases and tips Co-authored-by: lonix <2330355+lonix@users.noreply.github.com>
Contributor
Author
Implementation complete! (commit cd7f419) ✅ Command name: The feature is ready with:
Next steps: Add setup wizard integration and write tests. |
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.
Summary
Adds a feature that periodically posts Discord native polls from URL-based sources (copied to database) with optional role pinging to spark community discussions.
Implementation
Services & Models
Command Interface
/pollcommand with 8 subcommands:create- Configure poll schedule (channel, cron, duration, optional role ping)list- View active schedulesdelete- Remove scheduletest- Post immediate test polladd-item- Add poll to database manuallylist-items- View stored pollsdelete-item- Remove a poll questionimport-url- Import polls from YAML/JSON URL (copies to database)Poll Sources
URL Import: Fetches YAML/JSON from remote endpoint and copies all polls to database for local management
YAML Format:
JSON Format:
{ "polls": [ { "question": "What's your favorite season?", "answers": ["Spring", "Summer", "Fall", "Winter"], "multiselect": false, "tags": ["general"] } ] }Database Storage: All polls stored in MongoDB with smart rotation that avoids repeats within cooldown period
Configuration
Technical Details
ScheduledAnnouncementServicepattern for cron jobsjs-yamldependency for YAML parsing supportFeatures Included
✅ Cron-based scheduling (e.g., daily at noon)
✅ URL import with YAML/JSON support
✅ Automatic database storage for all polls
✅ Smart rotation avoiding recent repeats
✅ Multi-select poll support
✅ Optional role pinging
✅ Manual poll management
✅ Test mode for immediate posting
Features Excluded
❌ Poll statistics/result tracking (per user request)
❌ Poll result announcements (per user request)
Quality Checks
Future Work
Original prompt
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.