{"id":18534545,"url":"https://github.com/jakehamilton/leverage-plugin-discord","last_synced_at":"2025-05-14T23:34:59.547Z","repository":{"id":57126844,"uuid":"96252776","full_name":"jakehamilton/leverage-plugin-discord","owner":"jakehamilton","description":"🎙 A Discord plugin for Leverage","archived":false,"fork":false,"pushed_at":"2019-02-20T05:11:17.000Z","size":88,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-22T22:01:08.886Z","etag":null,"topics":["discord","leverage","node"],"latest_commit_sha":null,"homepage":"","language":"TypeScript","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/jakehamilton.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":"2017-07-04T20:58:58.000Z","updated_at":"2019-02-20T05:11:18.000Z","dependencies_parsed_at":"2022-08-31T17:02:38.508Z","dependency_job_id":null,"html_url":"https://github.com/jakehamilton/leverage-plugin-discord","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/jakehamilton%2Fleverage-plugin-discord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakehamilton%2Fleverage-plugin-discord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakehamilton%2Fleverage-plugin-discord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/jakehamilton%2Fleverage-plugin-discord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/jakehamilton","download_url":"https://codeload.github.com/jakehamilton/leverage-plugin-discord/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254248481,"owners_count":22039008,"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","leverage","node"],"created_at":"2024-11-06T19:16:08.111Z","updated_at":"2025-05-14T23:34:59.121Z","avatar_url":"https://github.com/jakehamilton.png","language":"TypeScript","readme":"# Discord for [Leverage](http://github.com/jakehamilton/leverage)!\n\nThis is a plugin for Leverage that handles the `discord` type of components.\n\n## Discord Component\n\nA Discord Component has the following interface:\n\n```typescript\nimport { ComponentConfig, ComponentUnit } from '@leverage/core';\n\nexport interface DiscordConfig extends ComponentConfig {\n    discord?: {\n        event?: string; // A `Discord.js` event name (defaults to 'message')\n        command?: string; // A prefix to listen for on \"message\" events (defaults to '')\n    };\n}\n\nexport interface DiscordComponent extends ComponentUnit {\n    config: DiscordConfig;\n\n    // The `payload` is a `Discord.js` object related to the event your component is listening to\n    discord: (payload: any) =\u003e void;\n}\n```\n\n## Example\n\n```js\nimport { manager } from '@leverage/core';\nimport { Discord, DiscordComponent } from '@leverage/plugin-discord';\n\nconst discord = new Discord();\n\nconst component: DiscordComponent = {\n    is: 'component',\n    type: 'discord',\n    discord ({ channel }) {\n        // Respond to all messages with \"Hello, World!\"\n        channel.send('Hello, World!');\n    },\n};\n\nmanager.add(discord, component);\n\ndiscord.login('\u003cYOUR_BOT_TOKEN\u003e');\n```\n\n## Questions\n\nHave a question? Feel free to [file an issue](https://github.com/jakehamilton/leverage-plugin-discord/issues/new)!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakehamilton%2Fleverage-plugin-discord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjakehamilton%2Fleverage-plugin-discord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjakehamilton%2Fleverage-plugin-discord/lists"}