{"id":26460298,"url":"https://github.com/ryleu/discord-command-trigger","last_synced_at":"2026-05-14T23:32:59.573Z","repository":{"id":182514492,"uuid":"667647290","full_name":"ryleu/discord-command-trigger","owner":"ryleu","description":"Safely run commands on a remote machine using Discord!","archived":false,"fork":false,"pushed_at":"2023-07-21T01:04:49.000Z","size":272,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-03-19T02:49:22.993Z","etag":null,"topics":["discord","remote-access-tool"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryleu.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-07-18T02:07:07.000Z","updated_at":"2023-08-04T21:30:32.000Z","dependencies_parsed_at":null,"dependency_job_id":"e6411bce-330b-419e-b831-2fc990482f31","html_url":"https://github.com/ryleu/discord-command-trigger","commit_stats":null,"previous_names":["ryleu/discord-command-trigger"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ryleu/discord-command-trigger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryleu%2Fdiscord-command-trigger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryleu%2Fdiscord-command-trigger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryleu%2Fdiscord-command-trigger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryleu%2Fdiscord-command-trigger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryleu","download_url":"https://codeload.github.com/ryleu/discord-command-trigger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryleu%2Fdiscord-command-trigger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":273082454,"owners_count":25042286,"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","status":"online","status_checked_at":"2025-09-01T02:00:09.058Z","response_time":120,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["discord","remote-access-tool"],"created_at":"2025-03-19T02:49:25.320Z","updated_at":"2026-05-14T23:32:54.549Z","avatar_url":"https://github.com/ryleu.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Command Trigger\n\nSafely run commands on a remote machine using Discord!\n\nCommand Trigger works by using a list of pre-made \"flows\" (lists of commands to\nbe run sequentially) that you can then trigger with a message in Discord.\n\n![Bot used to get free memory on target system.](screenshots/free_command.png)\n\n## Use\nTo use this project, you must create a bot at\n\u003chttps://discord.com/developers/applications\u003e.\n\nCommand Trigger uses [Poetry](https://python-poetry.org/). You can run the\nproject using poetry with this command:\n\n```sh\npoetry run python main.py\n```\n\n## Config File\nThe config file contains the authorized users (`owner_ids`), the authorized\nchannels (`channel_ids`), the bot's authorization token (`token`), and the max\nlength the command output can be before being uploaded as a file\n(`max_codeblock_length`).\n\nThe format is as follows:\n\n`config.json`:\n```json\n{\n  \"token\": \"token here\",\n  \"owner_ids\": [\n    587967909641584661,\n    600130839870963725\n  ],\n  \"channel_ids\": [\n    795651596709003295\n  ],\n  \"max_codeblock_length\": 1000\n}\n```\n\n## Flows\nA flow is made of four main components: the name, the description, the steps,\nand the output format. The `flows.json` file works as follows, replacing things\nin angle brackets with proper data:\n\n```json\n{\n    \"\u003cname\u003e\": {\n        \"description\": \"\u003cdescription\u003e\",\n        \"steps\": [\n            \"\u003cstep 1\u003e\",\n            \"\u003cstep 2\u003e\"\n        ],\n        \"format\": \"\u003cformat\u003e\"\n    }\n}\n```\n\nThe keys `description` and `format` are optional, defaulting to\n`*No description.*` and `ansi`, respectively. Using `discord` for the `format`\nkey will result in no code block, leaving it up to Discord how things are\nrendered.\n\nThe commands in `steps` will be combined by inserting a semi-colon between each\ncommand to make it into a one-liner. Please keep this in mind when writing\nflows!\n\nA few example flows already exist in `flows.json`.\n\n## Output\nImmediately after sending a trigger message, the bot will respond with a\nconfirmation message including the name of the flow, the description, and the\nsteps in said flow.\n\nAfter executing the commands, the bot will send a message containing the command\n`stdout`. If the `stdout` is greater than the length defined in `config.json` by\n`max_codeblock_length`, the `stdout` will be uploaded as a file. If `stderr` has\nany value, it will be uploaded as a file.\n\n![Bot used to get contents of main.py.](screenshots/code_command.png)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryleu%2Fdiscord-command-trigger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryleu%2Fdiscord-command-trigger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryleu%2Fdiscord-command-trigger/lists"}