feat: replace Telegram bot with Discord bot#6
Draft
Copilot wants to merge 3 commits into
Draft
Conversation
Co-authored-by: lipnelz <174376617+lipnelz@users.noreply.github.com>
Co-authored-by: lipnelz <174376617+lipnelz@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Replace Telegram bot with Discord bot
feat: replace Telegram bot with Discord bot
Mar 10, 2026
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.
Migrates the bot platform from Telegram (
python-telegram-bot) to Discord (discord.py==2.4.0). All commands, interactive flows, and periodic notifications are preserved with equivalent Discord-native patterns.Core Changes
requirements.txt— swappython-telegram-bot==22.6→discord.py==2.4.0topology_template.json—telegram_bot_token→discord_bot_token; admin ID is now a Discord snowflakeconfig.py— drop TelegramConversationHandlerstate integers (no longer needed)Bot Architecture
main.py— introducesRobbiBot(commands.Bot); shared state (node address, balance history, credentials, etc.) stored as instance attributes instead ofapplication.bot_data; slash commands registered insetup_hook()+tree.sync()handlers/common.py—auth_requiredwrapsdiscord.Interaction; reads whitelist frominteraction.client.allowed_user_ids;handle_api_errorusesinteraction.followup.send()Handler Rewrites
handlers/node.py—ConversationHandler+ inline keyboard callbacks replaced bydiscord.ui.Viewsubclasses for multi-step confirmation flows anddiscord.ui.Modalfor roll count input;setup_node_commands(bot)registers/node,/flush,/hist,/dockerhandlers/price.py—setup_price_commands(bot)registers/btc,/masusing defer + followup patternhandlers/system.py—setup_system_commands(bot)registers/hi,/temperature,/perfhandlers/scheduler.py— periodic pings DM users viabot.fetch_user(user_id)instead ofapplication.bot.send_message(chat_id=…)Example: interactive docker menu flow
Original prompt
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.