{"id":15021717,"url":"https://github.com/matteopolak/framecord","last_synced_at":"2025-07-12T06:37:19.089Z","repository":{"id":61440086,"uuid":"550556020","full_name":"matteopolak/framecord","owner":"matteopolak","description":"A template to create a modular and extensible Discord bot.","archived":false,"fork":false,"pushed_at":"2023-04-21T16:11:50.000Z","size":162,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-06-30T03:04:49.544Z","etag":null,"topics":["command","discord","discordjs","framecord","framework","library"],"latest_commit_sha":null,"homepage":"https://matteopolak.com/docs/framecord","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/matteopolak.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-10-13T00:50:44.000Z","updated_at":"2024-08-06T21:35:40.000Z","dependencies_parsed_at":"2024-09-24T12:03:52.828Z","dependency_job_id":"733422d7-7b94-422b-a547-dce80f6e1595","html_url":"https://github.com/matteopolak/framecord","commit_stats":{"total_commits":112,"total_committers":2,"mean_commits":56.0,"dds":0.008928571428571397,"last_synced_commit":"ec456121bb04960ef0579628915822815f603155"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/matteopolak/framecord","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteopolak%2Fframecord","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteopolak%2Fframecord/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteopolak%2Fframecord/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteopolak%2Fframecord/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/matteopolak","download_url":"https://codeload.github.com/matteopolak/framecord/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/matteopolak%2Fframecord/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264951610,"owners_count":23687974,"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":["command","discord","discordjs","framecord","framework","library"],"created_at":"2024-09-24T19:56:56.526Z","updated_at":"2025-07-12T06:37:19.074Z","avatar_url":"https://github.com/matteopolak.png","language":"TypeScript","readme":"# Framecord 🤖\n\n![Build Status](https://github.com/matteopolak/framecord/actions/workflows/ci.yml/badge.svg)\n![Docs Status](https://github.com/matteopolak/framecord/actions/workflows/docs.yml/badge.svg)\n![NPM Package Status](https://github.com/matteopolak/framecord/actions/workflows/npm.yml/badge.svg)\n\n[framecord](https://github.com/matteopolak/framecord) is a modular and extensible framework for creating Discord bots, created with [discord.js](https://github.com/discordjs/discord.js).\n\n## Documentation\n\nCheck out the documentation at **[matteopolak.com/docs/framecord](https://matteopolak.com/docs/framecord)**.\n\n## \"Hello, world!\"\n\nThe setup below will do the following:\n1. Create a slash command called `/helloworld` that outputs the message `Hello {user}!`\n2. Print `I just logged in as {username}!` to the console when the `ready` event is fired\n\n`src/index.ts`\n```typescript\nimport { join } from 'node:path';\n\nimport { IntentsBitField } from 'discord.js';\nimport { Client, Command } from '@matteopolak/framecord';\n\nconst client = new Client({\n  intents: [\n    IntentsBitField.Flags.Guilds\n  ]\n});\n\n// Client#compileCommandDirectory takes an *absolute path* to the\n// command directory, and will construct a tree of commands.\n//\n// Commands in nested folders will be grouped under the command by the\n// same name as the folder (which *must* exist)\n//\n// By default, commands are added relative to the root command node,\n// but you can provide the subcommand Collection of any command to start\n// there instead.\nawait client.compileCommandDirectory(join(__dirname, 'commands'));\n\n// Client#init must complete (i.e. await it) *before* the client is logged in.\nawait client.init();\n\nclient.login(process.env.TOKEN);\n```\n\n`src/commands/helloworld.ts`\n```typescript\nimport {\n  Command,\n  CommandOptions,\n  CommandResponse,\n  CommandSource,\n  EventHandler\n} from '@matteopolak/framecord';\n\n// *Must* be a default export in order to work properly when\n// adding an entire command directory\nexport default class HelloWorld extends Command {\n  // *Must* be an asynchronous function\n  public async run(source: CommandSource): CommandResponse {\n    return `Hello, ${source.user.username}!`;\n  }\n\n  // The @EventHandler decorator is used to define when\n  // a method should be treated as an event listener\n  //\n  // It currently only has the `once` option, which (when true)\n  // will stop listening to the event after it is fired once\n  @EventHandler({ once: true })\n  public async ready() {\n    // `client` is a reference to the Client\n    console.log(`I just logged in as ${this.client.user.username}!`);\n  }\n}\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteopolak%2Fframecord","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmatteopolak%2Fframecord","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmatteopolak%2Fframecord/lists"}