{"id":22166200,"url":"https://github.com/maxerbox/required-prefixe-fisherman","last_synced_at":"2026-07-14T15:48:18.308Z","repository":{"id":143906334,"uuid":"98462122","full_name":"maxerbox/required-prefixe-fisherman","owner":"maxerbox","description":"Fisherman middleware/plugin : Used to execute a command, only if the prefixe match with the one you want for the command","archived":false,"fork":false,"pushed_at":"2017-07-31T18:25:44.000Z","size":5,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-17T07:54:12.759Z","etag":null,"topics":[],"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/maxerbox.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-07-26T20:13:48.000Z","updated_at":"2017-07-30T10:45:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"93a52e12-a081-420d-9ee1-db965f490493","html_url":"https://github.com/maxerbox/required-prefixe-fisherman","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxerbox%2Frequired-prefixe-fisherman","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxerbox%2Frequired-prefixe-fisherman/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxerbox%2Frequired-prefixe-fisherman/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/maxerbox%2Frequired-prefixe-fisherman/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/maxerbox","download_url":"https://codeload.github.com/maxerbox/required-prefixe-fisherman/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245304868,"owners_count":20593626,"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":[],"created_at":"2024-12-02T05:18:29.713Z","updated_at":"2025-10-24T19:47:09.261Z","avatar_url":"https://github.com/maxerbox.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Fisherman Required Prefixe\n\n## Setup\n\n### Adding the middleware to fisherman\n\n```javascript\nconst fisherman = require(\"fisherman-discord.js\")\nvar bot = new fisherman.Fisherman({prefixes: [\"!\", \"cat!\"]});\nconst _reqPrefixe = require(\"required-prefixe-fisherman\");\nvar requirePrefixe = new _reqPrefixe({sendCode: true, code: 789}) //it will trigger the event fisherCode with a InvalidPrefixeException if the required prefixe is not respected\n//If sendCode is set to false, it will just block the middleware chain and doesn't trigger a fishercode\nbot.use(requirePrefixe);\n```\n\n### Setting up the command\n\n```javascript\nvar register = bot.createRegister('test', 'test') //Create a register named \"test\"\nregister.textCommand('ping', {locales: {requiredPrefixe: \"!\"}, function (req, res) { //the command will be only trigerred if the prefixe \"!\" is used\n  var current = Date.now()\n  res.send('Pinging......').then((message) =\u003e {\n    message.edit((Date.now() - current) + 'ms')\n  })\n})\n```\n\nThis modules is used as example, and can be improved manually, like for example supporting and array of required prefixes","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxerbox%2Frequired-prefixe-fisherman","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmaxerbox%2Frequired-prefixe-fisherman","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmaxerbox%2Frequired-prefixe-fisherman/lists"}