{"id":20105835,"url":"https://github.com/redwoodjs/discordjs-discourse-bot","last_synced_at":"2025-05-06T09:31:41.349Z","repository":{"id":37056542,"uuid":"493011377","full_name":"redwoodjs/discordjs-discourse-bot","owner":"redwoodjs","description":"Discord to Discourse Bot","archived":true,"fork":false,"pushed_at":"2024-12-09T16:05:55.000Z","size":124,"stargazers_count":3,"open_issues_count":18,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-04-28T12:26:43.574Z","etag":null,"topics":["bot","discord","discourse"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/redwoodjs.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,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2022-05-16T21:56:38.000Z","updated_at":"2024-12-09T19:46:37.000Z","dependencies_parsed_at":"2023-01-20T14:30:12.716Z","dependency_job_id":"596909fd-794a-4a7d-8fa2-86c47d09ef85","html_url":"https://github.com/redwoodjs/discordjs-discourse-bot","commit_stats":{"total_commits":54,"total_committers":5,"mean_commits":10.8,"dds":0.6111111111111112,"last_synced_commit":"85d10ba911fdabc2dc4cd9743f7af00fabcf5c63"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redwoodjs%2Fdiscordjs-discourse-bot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redwoodjs%2Fdiscordjs-discourse-bot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redwoodjs%2Fdiscordjs-discourse-bot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/redwoodjs%2Fdiscordjs-discourse-bot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/redwoodjs","download_url":"https://codeload.github.com/redwoodjs/discordjs-discourse-bot/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252657271,"owners_count":21783793,"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":["bot","discord","discourse"],"created_at":"2024-11-13T17:48:16.394Z","updated_at":"2025-05-06T09:31:41.021Z","avatar_url":"https://github.com/redwoodjs.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Discord to Discourse Bot\n\nCreates message menu button to send to discourse\n\nGenerates three buttons: Submit Message, Submit Thread/Channel, Select Message\n\nFetches messages based on button click\n\nSends to Discourse Plugin \n\n(https://github.com/discourse/discourse-prometheus-alert-receiver)?\n\nPosts to Discourse topic\n\n## How to run:\n\nClone repo \u003e `yarn install`\n\nSee these instructions to set up `config.json` \u0026 get `token`: https://discordjs.guide/creating-your-bot/#creating-configuration-files\n\nAnd find where to get `guildId` and `clientId` from: https://discordjs.guide/creating-your-bot/creating-commands.html#command-deployment-script\n\n\u003e TIP\n\u003e\n\u003e In order to get your application's client id, go to Discord Developer Portal and choose your application. Find the id under \"Application ID\" in General Information subpage. To get guild id, open Discord and go to your settings. On the \"Advanced\" page, turn on \"Developer Mode\". This will enable a \"Copy ID\" button in the context menu when you right-click on a server icon, a user's profile, etc.\n\nSet up `config.json` file with these three tokens:\n\n```\n{\n    \"clientId\": \"\",\n\t\"guildId\": \"\",\n\t\"token\": \"\"\n\n\t\"hostname\": \"\",\n    \"apiKey\": \"\",\n    \"apiUsername\": \"\"\n}\n```\n\nTo register menu command:\n\nrun: `node deploy-commands.js`\n\nTo run bot \u0026 accept incoming commands:\n\nrun: `node index.js`\n\n# Work In Progress\n\n~~**To-Do**: Create discourse plugin to accept message and post to topic~~\n\n**To-Do**: Convert to ES6?/RW\nFilter needle username out\nParse ``` at end of code blocks into newline\n\n**Cleanup**: Fetch all messages function can be cleaner\n\n**Cleanup**: Generally refactor the code into better practices \n\n**Bugs**: Selecting in thread throws error\n\n# Ideas\n\nData Explorer Queries: https://meta.discourse.org/t/how-to-run-data-explorer-queries-with-the-discourse-api/120063\n\n\u003e Virtually any action that can be performed through the Discourse user interface can also be triggered with the Discourse API. For a general overview of how to find the correct API request for an action, see How to reverse engineer the Discourse API 70.\n\nOfficial Direct SQL Access API for Discourse: https://meta.discourse.org/t/new-official-direct-sql-access-api-for-discourse-mini-sql/90441\n\n\nCheck errors \u0026 Report: \n\nstatusCode: 422\n{\"action\":\"create_post\",\"errors\":[\"Title has already been used\"]}\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredwoodjs%2Fdiscordjs-discourse-bot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fredwoodjs%2Fdiscordjs-discourse-bot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fredwoodjs%2Fdiscordjs-discourse-bot/lists"}