{"id":15669326,"url":"https://github.com/dcdunkan/y-by-example","last_synced_at":"2025-03-10T08:31:59.338Z","repository":{"id":103402966,"uuid":"524481569","full_name":"dcdunkan/y-by-example","owner":"dcdunkan","description":"grammY by example","archived":false,"fork":false,"pushed_at":"2022-09-15T13:08:10.000Z","size":577,"stargazers_count":4,"open_issues_count":3,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-02-25T17:44:25.861Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://yex.deno.dev","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/dcdunkan.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-08-13T18:46:26.000Z","updated_at":"2022-10-14T19:14:49.000Z","dependencies_parsed_at":null,"dependency_job_id":"e910edaa-47c4-4c89-9d25-0ba8abd1378f","html_url":"https://github.com/dcdunkan/y-by-example","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/dcdunkan%2Fy-by-example","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdunkan%2Fy-by-example/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdunkan%2Fy-by-example/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dcdunkan%2Fy-by-example/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dcdunkan","download_url":"https://codeload.github.com/dcdunkan/y-by-example/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":242819369,"owners_count":20190442,"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-10-03T14:22:18.234Z","updated_at":"2025-03-10T08:31:58.987Z","avatar_url":"https://github.com/dcdunkan.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003e Work in progress.\n\n\u003c!--\n![light-mode](https://user-images.githubusercontent.com/70066170/186004902-d48700c9-52c7-45a6-b966-3a9a0b49c263.png)\n![dark-mode](https://user-images.githubusercontent.com/70066170/186004908-e322db60-9dd7-4420-a241-d7e2c35883b7.png)\n--\u003e\n\n\u003cdiv align=\"center\"\u003e\n  \u003cpicture\u003e\n    \u003csource media=\"(prefers-color-scheme: dark)\" width=\"300\" alt=\"grammY by example\" srcset=\"https://user-images.githubusercontent.com/70066170/186004908-e322db60-9dd7-4420-a241-d7e2c35883b7.png\"\u003e\n    \u003cimg alt=\"grammY by example\" width=\"300\" src=\"https://user-images.githubusercontent.com/70066170/186004902-d48700c9-52c7-45a6-b966-3a9a0b49c263.png\"\u003e\n  \u003c/picture\u003e\n\u003c/div\u003e\n\u003cbr\u003e\n\nThis repository contains the source code for\n[grammY by example](https://yex.deno.dev) based on\n[Deno by Example](https://examples.deno.land).\n\ngrammY by example is a collection of annotated examples to help beginners to get\nstarted on using grammY, and the various features and plugins that comes with\nit.\n\n- Each example should be a single file\n- Examples are written in TypeScript\n- Examples are primarily written for [Deno](https://deno.land) runtime (with\n  changes in imports they can also run on Node.js)\n- Each example should be a self-contained unit, and should depend on no\n  dependencies other than core library, official plugins, and runtime libraries\n  (exceptions can be made)\n- Each example should be runnable without additional dependencies on all systems\n- Code should be kept really simple, and should be easy to read and understand\n  by anyone. Do not use complicated code constructs, or hard to follow builtins\n- Concepts introduced in an example should be explained using simple words\n\n## Contributing\n\n### Adding an example\n\nTo add an example, create a file in the [contents/](./contents/) directory. The\nfile name should be the id of the example, and the contents should be the code\nfor the example. The file should be in the `.ts` format. The file should start\nwith a JSDoc style multi line comment that describes the example:\n\n```ts\n/**\n * @title Hello World\n * @deno_cli --allow-net \u003curl\u003e\n *\n * Make your bot say \"Hello World\" to users.\n */\n```\n\nSee all supported tags and their explanation [here](#supported-tags).\n\nAfter the pragmas, you should add a description of the example. It should not be\nlonger than one or two lines. The description shows up at the top of the example\nin the example page, home page, and in search results.\n\nAfter the JSDoc comment, you can write the code. Code can be prefixed with a\ncomment that describes the code. The comment will be rendered next to the code\nin the example page.\n\nOptionally, if the first comment is not suffixed with a code snippet, it will be\nconsidered as an introduction of the example, and rendered in full width (not\nnext to a code block). It can be a little descriptive introduction that extends\nthe actual description of the example. Similarly, if the final comment is not\nsuffixed with a code snippet, it'll be considered as conclusion section of the\nexample and will be rendered like the introduction.\n\nNow add your example to the [table of contents](./utils/contents.ts) file. This\nwill cause it to show up on the index page. It should be added to an appropriate\nposition based on how advanced the example is. The simpler the example is, the\nhigher the position it gets.\n\nAfter you have added the example, run `deno fmt` and `deno lint` to format and\nlint the example.\n\n#### Supported tags\n\n- `title`: Title of the example. Must be super short but clear. This is the only\n  required tag.\n- `run`: If this tag is given the example is considered as runnable on browser\n  and buttons for running the example will be shown.\n- `resource`: Additional resources that readers can refer to. An example can\n  have more than one `@resource` tags.\n- `deno_cli`: This tag must be provided if the example can be run with\n  [Deno CLI](https://deno.land). Required permissions must be provided as well.\n- `deno_pg`: Link to Deno Deploy playground, if any. Recommended to provide, so\n  that the Deno users can play with it.\n- `stackblitz`: Link to a stackblitz project. Recommended to provide, so that\n  the Node.js users can play with it.\n\nExample usage of the tags:\n\n```ts\n/**\n * @title Example Title\n * @run\n * @resource {https://grammy.dev/guide/} Docs: Getting Started\n * @resource {https://core.telegram.org/bots/api/} Bot API Docs: Example\n * @deno_cli --allow-net \u003curl\u003e\n * @deno_pg https://dash.deno.com/playground/grammy-example\n * @stackblitz https://node.new\n *\n * Short and simple description of the example.\n */\n```\n\n### Running the webserver locally\n\nTo run the webserver locally, open a terminal and run:\n\n```shell\ndeno task dev\n```\n\nYou can then view the page at http://localhost:8000/\n\nBefore opening a PR with a change, make sure `deno fmt` and `deno lint` pass in\nthe latest Deno release.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcdunkan%2Fy-by-example","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdcdunkan%2Fy-by-example","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdcdunkan%2Fy-by-example/lists"}