{"id":31883735,"url":"https://github.com/abcdan/discord-hook","last_synced_at":"2026-05-16T11:04:38.644Z","repository":{"id":57212535,"uuid":"232132369","full_name":"abcdan/discord-hook","owner":"abcdan","description":"Node.js library to post to Discord Webhooks.","archived":false,"fork":false,"pushed_at":"2020-01-07T16:50:10.000Z","size":13,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-10-10T21:48:00.636Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/abcdan.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}},"created_at":"2020-01-06T15:44:04.000Z","updated_at":"2020-01-07T16:50:13.000Z","dependencies_parsed_at":"2022-09-07T09:50:09.221Z","dependency_job_id":null,"html_url":"https://github.com/abcdan/discord-hook","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/abcdan/discord-hook","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abcdan%2Fdiscord-hook","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abcdan%2Fdiscord-hook/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abcdan%2Fdiscord-hook/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abcdan%2Fdiscord-hook/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/abcdan","download_url":"https://codeload.github.com/abcdan/discord-hook/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/abcdan%2Fdiscord-hook/sbom","scorecard":{"id":160028,"data":{"date":"2025-08-11","repo":{"name":"github.com/abcdan/discord-hook","commit":"1bec13c3fb34f3f252818ace800909d4ba977f24"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":2.3,"checks":[{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Code-Review","score":0,"reason":"Found 0/6 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":4,"reason":"6 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: GHSA-v88g-cgmw-v5xw","Warn: Project is vulnerable to: GHSA-fjxv-7rqg-78g4","Warn: Project is vulnerable to: GHSA-896r-f27r-55mw","Warn: Project is vulnerable to: GHSA-hrpp-h998-j3pp","Warn: Project is vulnerable to: GHSA-p8p7-x288-28g6","Warn: Project is vulnerable to: GHSA-72xf-g2v4-qvf3"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-16T13:07:40.317Z","repository_id":57212535,"created_at":"2025-08-16T13:07:40.317Z","updated_at":"2025-08-16T13:07:40.317Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279013502,"owners_count":26085368,"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-10-13T02:00:06.723Z","response_time":61,"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":[],"created_at":"2025-10-13T03:26:40.593Z","updated_at":"2025-10-13T03:26:42.628Z","avatar_url":"https://github.com/abcdan.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Hook\nA Node.js Module to post to Discord Webhooks.\n\n# Examples\nCheck the `example.js` in the `examples` folder\n\n# Installation\nSimply run\n`npm i discord-hook-api` or `yarn add discord-hook-api`\n\n# Documentation\nPut this somewhere on the top of your document\n```js\nconst { Hook, Embed } = require('discord-hook-api')\n```\n\n## Hook Methods\nTo get started, you need to give up the webhook URL and append the methods using `.method(argument)` on the next lines.\n### `webhook(url)`\nPass the url for the webhook, there are two ways to pass it.\n\u003cbr\u003e*Argument(s): string*\n```js\nnew Hook()\n  .webhook(webhook_url_here)\n// or\nnew Hook(webhook_url_here)\n```\n\n### `addEmbed(embed)`\nSimply add an embed to the post by using the `addElement` method, you pass an embed which you can make as well. More information later in this documenation.\n\u003cbr\u003e*Argument(s): embed*\n```js\nnew Hook()\n  .addEmbed(embed)\n```\n\n### `setAvatar(avatar)`\nOverwrite the avatar set in the webhook settings on Discord, you need to pass an URL to it which directly leads to a file. You can use something like [file.coffee](https://file.coffee) for it.\n\u003cbr\u003e*Argument(s): string*\n```js\nnew Hook()\n  .setAvatar(url)\n```\n\n### `setContent(content)`\nThis is the message you want to display, you can leave it blank if you are gonna send an embed.\n\u003cbr\u003e*Argument(s): string*\n```js\nnew Hook()\n  .setAvatar(content)\n```\n\n### `setUsername(username)`\nOverwrite the username set in the webhook settings on Discord, you need to pass a string.\n\u003cbr\u003e*Argument(s): string*\n```js\nnew Hook()\n  .setUsername(username)\n```\n\n### `setTts()`\nWant to make the webhook speak to all it's users, you can do it.\n\u003cbr\u003e*Argument(s): none*\n```js\nnew Hook()\n  .setTts(boolean)\n```\n\n### `send()`\nDone making the message? Run this method and it will be delivered to Discord.\n\u003cbr\u003e*Argument(s): none*\n```js\nnew Hook()\n  .send()\n```\n\n## Embed Methods\nWant to send a fancy message? The Embed class got you covered. Start with the following and append the methods using `.method(argument)` on the next lines.\n```js\nconst embed = new Embed()\n```\n\n### `setTitle(title)`\nSet the title of the embed\n\u003cbr\u003e*Argument(s): string*\n```js\nconst embed = new Embed()\n  .setTitle(title)\n```\n\n### `setDescription(description)`\nSet the description of the embed\n\u003cbr\u003e*Argument(s): string*\n```js\nconst embed = new Embed()\n  .setDescription(description)\n```\n\n### `setUrl(url)`\nSet the url of the embed\n\u003cbr\u003e*Argument(s): string*\n```js\nconst embed = new Embed()\n  .setUrl(url)\n```\n\n### `setTimestamp(timestamp)`\nSet the timestamp for the footer of the timestamp, you don't need to pass an argument and it will pick the current time.\n\u003cbr\u003e*Argument(s): string*\n```js\nconst embed = new Embed()\n  .setTimestamp(timestamp)\n```\n\n### `setColor(setColor)`\nSet the color of the embed\n\u003cbr\u003e*Argument(s): integer*\n```js\nconst embed = new Embed()\n  .setColor(setColor)\n```\n\n### `setFooter(text, icon)`\nSet the footer of the embed, the icon is optional if you are using this method.\n\u003cbr\u003e*Argument(s): string, string*\n```js\nconst embed = new Embed()\n  .setFooter(text, icon)\n```\n\n### `setImage(url)`\nSet the image of the embed\n\u003cbr\u003e*Argument(s): string*\n```js\nconst embed = new Embed()\n  .setImage(url)\n```\n\n### `setThumbnail(url)`\nSet the thumbnail of the embed\n\u003cbr\u003e*Argument(s): string*\n```js\nconst embed = new Embed()\n  .setThumbnail(url)\n```\n\n### `setVideo(url)`\nSet the video of the embed\n\u003cbr\u003e*Argument(s): string*\n```js\nconst embed = new Embed()\n  .setVideo(url)\n```\n\n### `setAuthor(name, icon, url)`\nSet the author of the embed, icon and url are optional.\n\u003cbr\u003e*Argument(s): string, string, string*\n```js\nconst embed = new Embed()\n  .setAuthor(name, icon, url)\n```\n\n### `addField(name, value, inline)`\nAdd a field to the embed, max is 25 fields.\n\u003cbr\u003e*Argument(s): string*\n```js\nconst embed = new Embed()\n  .addField(name, value, inline)\n```\n\n# License\nReleased under the `MIT` License\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabcdan%2Fdiscord-hook","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fabcdan%2Fdiscord-hook","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fabcdan%2Fdiscord-hook/lists"}