{"id":18038870,"url":"https://github.com/ryanfarber/discord-logger","last_synced_at":"2026-05-02T06:44:12.090Z","repository":{"id":41462224,"uuid":"310736210","full_name":"ryanfarber/discord-logger","owner":"ryanfarber","description":"use discord like console.log()","archived":false,"fork":false,"pushed_at":"2022-07-09T04:39:47.000Z","size":46,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-10-22T11:12:41.569Z","etag":null,"topics":["console","discord","logger","logging"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ryanfarber.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2020-11-07T00:36:29.000Z","updated_at":"2022-07-02T08:53:43.000Z","dependencies_parsed_at":"2022-09-05T00:50:26.461Z","dependency_job_id":null,"html_url":"https://github.com/ryanfarber/discord-logger","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/ryanfarber/discord-logger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfarber%2Fdiscord-logger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfarber%2Fdiscord-logger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfarber%2Fdiscord-logger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfarber%2Fdiscord-logger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ryanfarber","download_url":"https://codeload.github.com/ryanfarber/discord-logger/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ryanfarber%2Fdiscord-logger/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32525896,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-02T01:12:54.858Z","status":"online","status_checked_at":"2026-05-02T02:00:05.923Z","response_time":132,"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":["console","discord","logger","logging"],"created_at":"2024-10-30T14:07:00.001Z","updated_at":"2026-05-02T06:44:12.071Z","avatar_url":"https://github.com/ryanfarber.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# discord-logger\n\n![image](https://cdn.glitch.com/dc4b1449-e9df-4aaa-a6ef-c17b2496dea6%2F49180_3_640px.jpg?v=1604715451701)\n\nlog to a discord channel. uses discord webhooks\n\n### getting your webhook URL\n1) find the channel you want to log to\n2) click the `Edit Channel` button\n3) click `Integrations` in the side panel\n4) click `View Webhooks`\n5) if you don't already have a webhook dedicated for this logger, click `New Webhook`\n6) click the `Copy Webhook URL` button\n7) done! use this URL when in the instance config\n\n### usage\n```javascript\nconst DiscordLogger = require(\"@ryanforever/discord-logger\")\nconst logger = new DiscordLogger({\n\tname: \"discordLogger\", // name your logger, defaults to \"logger\"\n\turl: process.env.DISCORD_WEBHOOK_URL, // webhook url\n})\n\nlogger.log(\"this is a log\")\nlogger.info(\"this is info\")\nlogger.warn(\"this is a warning\")\nlogger.error(\"this is an error\")\nlogger.debug(\"this is a debug\")\n```\n\n### change name of logger on the fly\nhandy to quickly change the name \n```javascript\n\n// change name via logger.name\nlogger.name = \"boosted\"\nlogger.log(\"this log will have a new name\")\n// [log] this log will have a new name\n\n//                ~ or ~\n\n// change name via opts parameter\nlogger.log(\"change name via config\", {name: \"zoinks\"})\n// [log] change name via config\n````\n\n### change style\nchange how the logger appears in discord\n```javascript\nconst logger = new DiscordLogger({\n\tname: \"discordLogger\",\n\turl: process.env.DISCORD_WEBHOOK_URL,\n\tstyle: \"console\" // options are \"text\" \"console\" or \"default\"\n})\n```\n\n### edit a log\npass in the returned log object to logger.edit to edit the log in place\n```javascript\nlet log = await logger.log(\"original log\")\nlogger.edit(log,\"new log\")\n```\n\n### delete a log\npass in the returned log object to logger.delete to delete the log\n```javascript\nlet log = await logger.log(\"this log will go bye bye\")\nlogger.delete(log)\n```\n\n## methods\n\n`.log(string, opts)`\n\n`.info(string, opts)`\n\n`.warn(string, opts)`\n\n`.error(string, opts)`\n\n`.debug(string, opts)`\n\n`.edit(logObject, string)`\n\n`.delete(logObject)`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfarber%2Fdiscord-logger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fryanfarber%2Fdiscord-logger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fryanfarber%2Fdiscord-logger/lists"}