{"id":17169628,"url":"https://github.com/jb3/webhook-discord","last_synced_at":"2025-04-07T12:05:37.468Z","repository":{"id":39922735,"uuid":"74161517","full_name":"jb3/webhook-discord","owner":"jb3","description":"A simple Javascript file for nicely formatting Discord webhooks","archived":false,"fork":false,"pushed_at":"2022-05-21T07:36:47.000Z","size":699,"stargazers_count":100,"open_issues_count":11,"forks_count":38,"subscribers_count":6,"default_branch":"master","last_synced_at":"2024-05-02T02:39:41.153Z","etag":null,"topics":["discord","discord-webhooks","javascript","npm-package","utility","webhooks"],"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/jb3.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-18T19:50:20.000Z","updated_at":"2024-02-01T11:21:57.000Z","dependencies_parsed_at":"2022-09-15T12:03:09.941Z","dependency_job_id":null,"html_url":"https://github.com/jb3/webhook-discord","commit_stats":null,"previous_names":["joebanks13/discord-webhooks"],"tags_count":27,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jb3%2Fwebhook-discord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jb3%2Fwebhook-discord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jb3%2Fwebhook-discord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jb3%2Fwebhook-discord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jb3","download_url":"https://codeload.github.com/jb3/webhook-discord/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247648976,"owners_count":20972945,"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":["discord","discord-webhooks","javascript","npm-package","utility","webhooks"],"created_at":"2024-10-14T23:26:49.515Z","updated_at":"2025-04-07T12:05:37.449Z","avatar_url":"https://github.com/jb3.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Discord Webhooks\n![version](https://img.shields.io/npm/v/webhook-discord.svg \"Version\")\n![npm](https://img.shields.io/npm/dt/webhook-discord.svg \"Total Downloads\")\n\nA simple Javascript file for nicely formatting Discord webhooks\n\nSee the full documentation at [jb3.github.io/webhook-discord](https://jb3.github.io/webhook-discord)\n\n## Usage\nIt's simple\n\nTo initialise:\n```js\nconst webhook = require(\"webhook-discord\")\n\nconst Hook = new webhook.Webhook(\"WEBHOOK URL\")\n```\n\n### Presets\n\nTo send an info message:\n```js\nHook.info(\"WEBHOOK NAME\",\"Info\")\n```\n\nTo send a warning message:\n```js\nHook.warn(\"WEBHOOK NAME\", \"Warning message\")\n```\n\nTo send an error message:\n```js\nHook.err(\"WEBHOOK NAME\",\"Error\")\n```\n\nTo send a success message:\n```js\nHook.success(\"WEBHOOK NAME\",\"Yay we did something right\")\n```\n\n### Custom messages\n\nTo send custom messages, you should make use of the MessageBuilder.\n\nSee all the options on the [documentation](https://jb3.github.io/webhook-discord/MessageBuilder.html)\n\n```js\nconst webhook = require(\"webhook-discord\");\n\nconst Hook = new webhook.Webhook(\"WEBHOOK URL\");\n\nconst msg = new webhook.MessageBuilder()\n                .setName(\"Username\")\n                .setColor(\"#aabbcc\")\n                .setText(\"This is my webhook!\");\nHook.send(msg);\n```\n\n## Installation\nEither use npm:\n```\nnpm install webhook-discord\n```\nOr clone from source:\n```\ngit clone https://github.com/jb3/webhook-discord.git\n```\n\n## License\n\nMIT\n\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjb3%2Fwebhook-discord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjb3%2Fwebhook-discord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjb3%2Fwebhook-discord/lists"}