From 729c2fed7f3b3da56cd0cd4055ffa18cf7673a68 Mon Sep 17 00:00:00 2001 From: Roman Khabarov Date: Tue, 9 Jul 2024 22:40:14 +0200 Subject: [PATCH] Deploy website - based on df565452ca9ab5931f83873c965c9800f578fbde --- 404.html | 2 +- __docusaurus/debug.html | 2 +- __docusaurus/debug/config.html | 2 +- __docusaurus/debug/content.html | 2 +- __docusaurus/debug/globalData.html | 2 +- __docusaurus/debug/metadata.html | 2 +- __docusaurus/debug/registry.html | 2 +- __docusaurus/debug/routes.html | 2 +- assets/js/{56b0b38a.d1d3b8e4.js => 56b0b38a.e33a4d10.js} | 2 +- .../js/{runtime~main.87f217f1.js => runtime~main.09f9b340.js} | 2 +- contributing/code-of-conduct.html | 2 +- contributing/commit-convention.html | 2 +- contributing/contribution-guide.html | 2 +- contributing/funding.html | 2 +- index.html | 2 +- interactions/message-interactions.html | 4 ++-- search.html | 2 +- sw.js | 2 +- text-commands.html | 2 +- 19 files changed, 20 insertions(+), 20 deletions(-) rename assets/js/{56b0b38a.d1d3b8e4.js => 56b0b38a.e33a4d10.js} (63%) rename assets/js/{runtime~main.87f217f1.js => runtime~main.09f9b340.js} (98%) diff --git a/404.html b/404.html index c9fbafb..284b14c 100644 --- a/404.html +++ b/404.html @@ -14,7 +14,7 @@ - + diff --git a/__docusaurus/debug.html b/__docusaurus/debug.html index 178a363..3ee5029 100644 --- a/__docusaurus/debug.html +++ b/__docusaurus/debug.html @@ -14,7 +14,7 @@ - + diff --git a/__docusaurus/debug/config.html b/__docusaurus/debug/config.html index 8f12791..64c1e8a 100644 --- a/__docusaurus/debug/config.html +++ b/__docusaurus/debug/config.html @@ -14,7 +14,7 @@ - + diff --git a/__docusaurus/debug/content.html b/__docusaurus/debug/content.html index d907bfd..36fa0dd 100644 --- a/__docusaurus/debug/content.html +++ b/__docusaurus/debug/content.html @@ -14,7 +14,7 @@ - + diff --git a/__docusaurus/debug/globalData.html b/__docusaurus/debug/globalData.html index 7640b34..37e399b 100644 --- a/__docusaurus/debug/globalData.html +++ b/__docusaurus/debug/globalData.html @@ -14,7 +14,7 @@ - + diff --git a/__docusaurus/debug/metadata.html b/__docusaurus/debug/metadata.html index a0846c2..ecacdf1 100644 --- a/__docusaurus/debug/metadata.html +++ b/__docusaurus/debug/metadata.html @@ -14,7 +14,7 @@ - + diff --git a/__docusaurus/debug/registry.html b/__docusaurus/debug/registry.html index be67073..d03a61c 100644 --- a/__docusaurus/debug/registry.html +++ b/__docusaurus/debug/registry.html @@ -14,7 +14,7 @@ - + diff --git a/__docusaurus/debug/routes.html b/__docusaurus/debug/routes.html index 8b3958a..1f5b982 100644 --- a/__docusaurus/debug/routes.html +++ b/__docusaurus/debug/routes.html @@ -14,7 +14,7 @@ - + diff --git a/assets/js/56b0b38a.d1d3b8e4.js b/assets/js/56b0b38a.e33a4d10.js similarity index 63% rename from assets/js/56b0b38a.d1d3b8e4.js rename to assets/js/56b0b38a.e33a4d10.js index 223dcbf..9e79bf1 100644 --- a/assets/js/56b0b38a.d1d3b8e4.js +++ b/assets/js/56b0b38a.e33a4d10.js @@ -1 +1 @@ -"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[356],{308:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var o=n(6106),s=n(9252);const a={id:"message-interactions",title:"Message Interactions",sidebar_position:3},r=void 0,i={id:"interactions/message-interactions",title:"Message Interactions",description:"Message interactions \u2014 we'll call them \"interaction\" moving forward\u2014are a framework for adding interactive elements to the messages your app or bot sends. They're accessible, customizable, and easy to use.",source:"@site/content/interactions/interaction-components.md",sourceDirName:"interactions",slug:"/interactions/message-interactions",permalink:"/interactions/message-interactions",draft:!1,unlisted:!1,editUrl:"https://github.com/GlobalArtInc/nestgram/tree/master/docs/content/interactions/interaction-components.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{id:"message-interactions",title:"Message Interactions",sidebar_position:3},sidebar:"docsSidebar",previous:{title:"Introduction",permalink:"/"},next:{title:"Text Commands",permalink:"/text-commands"}},c={},l=[{value:"Button",id:"button",level:2}];function m(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Message interactions"})," \u2014 we'll call them \"interaction\" moving forward\u2014are a framework for adding interactive elements to the messages your app or bot sends. They're accessible, customizable, and easy to use."]}),"\n",(0,o.jsx)(t.p,{children:"There are several different types of interactions; this documentation will outline the basics of this new framework and each example."}),"\n",(0,o.jsx)(t.h2,{id:"button",children:"Button"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Buttons"})," are interactive components that render on messages. They can be clicked by users, and send an interaction to your app when clicked."]}),"\n",(0,o.jsx)("img",{src:"/img/content/button.jpg",alt:"Buttons",width:"500"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-typescript",metastring:'title="src/app.components.ts"',children:"import { Injectable } from '@nestjs/common';\nimport { Context, Button, ButtonContext, ComponentParam, On, TextCommandContext } from '@globalart/nestcord';\nimport { Markup, Telegraf } from 'telegraf';\n\n@Injectable()\nexport class AppService {\n constructor(private readonly client: Telegraf) {\n\n }\n getHello(): string {\n return 'Hello World!';\n }\n\n @TextCommand({\n name: 'start',\n description: 'Displays this help message.',\n })\n onStart(@Context() [ctx]: TextCommandContext) {\n const inlineKeyboard = Markup.inlineKeyboard([\n {\n text: 'Button 1',\n callback_data: 'nestgram/button1',\n },\n {\n text: 'Button 2',\n callback_data: 'nestgram/button2',\n },\n ])\n\n ctx.reply('Start message', inlineKeyboard);\n }\n\n @Button('nestgram/:name')\n async handleClickButton(@Context() ctx: ButtonContext, @ComponentParam('name') name: string) {\n await ctx.reply(`clicked on ${name}`);\n }\n}\n"})})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(m,{...e})}):m(e)}},9252:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var o=n(7378);const s={},a=o.createContext(s);function r(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file +"use strict";(self.webpackChunkdocs=self.webpackChunkdocs||[]).push([[356],{308:(e,t,n)=>{n.r(t),n.d(t,{assets:()=>c,contentTitle:()=>r,default:()=>d,frontMatter:()=>a,metadata:()=>i,toc:()=>l});var o=n(6106),s=n(9252);const a={id:"message-interactions",title:"Message Interactions",sidebar_position:3},r=void 0,i={id:"interactions/message-interactions",title:"Message Interactions",description:"Message interactions \u2014 we'll call them \"interaction\" moving forward\u2014are a framework for adding interactive elements to the messages your app or bot sends. They're accessible, customizable, and easy to use.",source:"@site/content/interactions/interaction-components.md",sourceDirName:"interactions",slug:"/interactions/message-interactions",permalink:"/interactions/message-interactions",draft:!1,unlisted:!1,editUrl:"https://github.com/GlobalArtInc/nestgram/tree/master/docs/content/interactions/interaction-components.md",tags:[],version:"current",sidebarPosition:3,frontMatter:{id:"message-interactions",title:"Message Interactions",sidebar_position:3},sidebar:"docsSidebar",previous:{title:"Introduction",permalink:"/"},next:{title:"Text Commands",permalink:"/text-commands"}},c={},l=[{value:"Button",id:"button",level:2}];function m(e){const t={code:"code",h2:"h2",p:"p",pre:"pre",strong:"strong",...(0,s.R)(),...e.components};return(0,o.jsxs)(o.Fragment,{children:[(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Message interactions"})," \u2014 we'll call them \"interaction\" moving forward\u2014are a framework for adding interactive elements to the messages your app or bot sends. They're accessible, customizable, and easy to use."]}),"\n",(0,o.jsx)(t.p,{children:"There are several different types of interactions; this documentation will outline the basics of this new framework and each example."}),"\n",(0,o.jsx)(t.h2,{id:"button",children:"Button"}),"\n",(0,o.jsxs)(t.p,{children:[(0,o.jsx)(t.strong,{children:"Buttons"})," are interactive components that render on messages. They can be clicked by users, and send an interaction to your app when clicked."]}),"\n",(0,o.jsx)("img",{src:"/img/content/button.jpg",alt:"Buttons",width:"500"}),"\n",(0,o.jsx)(t.pre,{children:(0,o.jsx)(t.code,{className:"language-typescript",metastring:'title="src/app.components.ts"',children:"import { Injectable } from '@nestjs/common';\nimport { Context, Button, ButtonContext, ComponentParam, On, TextCommandContext } from '@nestgramjs/core';\nimport { Markup, Telegraf } from 'telegraf';\n\n@Injectable()\nexport class AppService {\n constructor(private readonly client: Telegraf) {\n\n }\n getHello(): string {\n return 'Hello World!';\n }\n\n @TextCommand({\n name: 'start',\n description: 'Displays this help message.',\n })\n onStart(@Context() [ctx]: TextCommandContext) {\n const inlineKeyboard = Markup.inlineKeyboard([\n {\n text: 'Button 1',\n callback_data: 'nestgram/button1',\n },\n {\n text: 'Button 2',\n callback_data: 'nestgram/button2',\n },\n ])\n\n ctx.reply('Start message', inlineKeyboard);\n }\n\n @Button('nestgram/:name')\n async handleClickButton(@Context() ctx: ButtonContext, @ComponentParam('name') name: string) {\n await ctx.reply(`clicked on ${name}`);\n }\n}\n"})})]})}function d(e={}){const{wrapper:t}={...(0,s.R)(),...e.components};return t?(0,o.jsx)(t,{...e,children:(0,o.jsx)(m,{...e})}):m(e)}},9252:(e,t,n)=>{n.d(t,{R:()=>r,x:()=>i});var o=n(7378);const s={},a=o.createContext(s);function r(e){const t=o.useContext(a);return o.useMemo((function(){return"function"==typeof e?e(t):{...t,...e}}),[t,e])}function i(e){let t;return t=e.disableParentContext?"function"==typeof e.components?e.components(s):e.components||s:r(e.components),o.createElement(a.Provider,{value:t},e.children)}}}]); \ No newline at end of file diff --git a/assets/js/runtime~main.87f217f1.js b/assets/js/runtime~main.09f9b340.js similarity index 98% rename from assets/js/runtime~main.87f217f1.js rename to assets/js/runtime~main.09f9b340.js index e53401a..f3861db 100644 --- a/assets/js/runtime~main.87f217f1.js +++ b/assets/js/runtime~main.09f9b340.js @@ -1 +1 @@ -(()=>{"use strict";var e,t,a,r,o,n={},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var a=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,d),a.loaded=!0,a.exports}d.m=n,d.c=f,e=[],d.O=(t,a,r,o)=>{if(!a){var n=1/0;for(i=0;i=o)&&Object.keys(d.O).every((e=>d.O[e](a[c])))?a.splice(c--,1):(f=!1,o0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[a,r,o]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);d.r(o);var n={};t=t||[null,a({}),a([]),a(a)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=a(f))Object.getOwnPropertyNames(f).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,d.d(o,n),o},d.d=(e,t)=>{for(var a in t)d.o(t,a)&&!d.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,a)=>(d.f[a](e,t),t)),[])),d.u=e=>"assets/js/"+({48:"a94703ab",98:"a7bd4aaa",138:"1a4e3797",222:"b38399eb",254:"68e633d4",356:"56b0b38a",365:"717a4525",399:"a4b529fe",401:"17896441",497:"f217256c",504:"ede3a018",506:"003b49f9",567:"22dd74f7",597:"3c0a97de",610:"946bd85a",647:"5e95c892",680:"6794d4cd",742:"aba21aa0",815:"ba8b3534",911:"23abe487",931:"ec3f407b",957:"c141421f",984:"5ca74542"}[e]||e)+"."+{48:"5f1134df",82:"24f8379a",98:"94b43be7",138:"73f56dac",152:"2879f71a",222:"b50206ab",254:"326c0945",356:"d1d3b8e4",365:"d078597f",399:"341c5d2e",401:"1d360417",497:"70a0c149",504:"c7928b24",506:"12210af2",567:"f2c1f917",576:"cdafb8cc",591:"902b1791",597:"ab922ab4",610:"b9fb3053",647:"02078198",649:"9a6961f8",680:"d6162667",742:"eb7bf6f2",815:"c212ece2",883:"96c53632",903:"266c3f77",911:"67a0649f",931:"9c77baaa",957:"faee654a",984:"015ae1ff"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="docs:",d.l=(e,t,a,n)=>{if(r[e])r[e].push(t);else{var f,c;if(void 0!==a)for(var b=document.getElementsByTagName("script"),i=0;i{f.onerror=f.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(a))),t)return t(a)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),c&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/",d.gca=function(e){return e={17896441:"401",a94703ab:"48",a7bd4aaa:"98","1a4e3797":"138",b38399eb:"222","68e633d4":"254","56b0b38a":"356","717a4525":"365",a4b529fe:"399",f217256c:"497",ede3a018:"504","003b49f9":"506","22dd74f7":"567","3c0a97de":"597","946bd85a":"610","5e95c892":"647","6794d4cd":"680",aba21aa0:"742",ba8b3534:"815","23abe487":"911",ec3f407b:"931",c141421f:"957","5ca74542":"984"}[e]||e,d.p+d.u(e)},(()=>{var e={354:0,869:0};d.f.j=(t,a)=>{var r=d.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise(((a,o)=>r=e[t]=[a,o]));a.push(r[2]=o);var n=d.p+d.u(t),f=new Error;d.l(n,(a=>{if(d.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=a&&("load"===a.type?"missing":a.type),n=a&&a.target&&a.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,r[1](f)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,a)=>{var r,o,n=a[0],f=a[1],c=a[2],b=0;if(n.some((t=>0!==e[t]))){for(r in f)d.o(f,r)&&(d.m[r]=f[r]);if(c)var i=c(d)}for(t&&t(a);b{"use strict";var e,t,a,r,o,n={},f={};function d(e){var t=f[e];if(void 0!==t)return t.exports;var a=f[e]={id:e,loaded:!1,exports:{}};return n[e].call(a.exports,a,a.exports,d),a.loaded=!0,a.exports}d.m=n,d.c=f,e=[],d.O=(t,a,r,o)=>{if(!a){var n=1/0;for(i=0;i=o)&&Object.keys(d.O).every((e=>d.O[e](a[c])))?a.splice(c--,1):(f=!1,o0&&e[i-1][2]>o;i--)e[i]=e[i-1];e[i]=[a,r,o]},d.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return d.d(t,{a:t}),t},a=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,d.t=function(e,r){if(1&r&&(e=this(e)),8&r)return e;if("object"==typeof e&&e){if(4&r&&e.__esModule)return e;if(16&r&&"function"==typeof e.then)return e}var o=Object.create(null);d.r(o);var n={};t=t||[null,a({}),a([]),a(a)];for(var f=2&r&&e;"object"==typeof f&&!~t.indexOf(f);f=a(f))Object.getOwnPropertyNames(f).forEach((t=>n[t]=()=>e[t]));return n.default=()=>e,d.d(o,n),o},d.d=(e,t)=>{for(var a in t)d.o(t,a)&&!d.o(e,a)&&Object.defineProperty(e,a,{enumerable:!0,get:t[a]})},d.f={},d.e=e=>Promise.all(Object.keys(d.f).reduce(((t,a)=>(d.f[a](e,t),t)),[])),d.u=e=>"assets/js/"+({48:"a94703ab",98:"a7bd4aaa",138:"1a4e3797",222:"b38399eb",254:"68e633d4",356:"56b0b38a",365:"717a4525",399:"a4b529fe",401:"17896441",497:"f217256c",504:"ede3a018",506:"003b49f9",567:"22dd74f7",597:"3c0a97de",610:"946bd85a",647:"5e95c892",680:"6794d4cd",742:"aba21aa0",815:"ba8b3534",911:"23abe487",931:"ec3f407b",957:"c141421f",984:"5ca74542"}[e]||e)+"."+{48:"5f1134df",82:"24f8379a",98:"94b43be7",138:"73f56dac",152:"2879f71a",222:"b50206ab",254:"326c0945",356:"e33a4d10",365:"d078597f",399:"341c5d2e",401:"1d360417",497:"70a0c149",504:"c7928b24",506:"12210af2",567:"f2c1f917",576:"cdafb8cc",591:"902b1791",597:"ab922ab4",610:"b9fb3053",647:"02078198",649:"9a6961f8",680:"d6162667",742:"eb7bf6f2",815:"c212ece2",883:"96c53632",903:"266c3f77",911:"67a0649f",931:"9c77baaa",957:"faee654a",984:"015ae1ff"}[e]+".js",d.miniCssF=e=>{},d.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),d.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},o="docs:",d.l=(e,t,a,n)=>{if(r[e])r[e].push(t);else{var f,c;if(void 0!==a)for(var b=document.getElementsByTagName("script"),i=0;i{f.onerror=f.onload=null,clearTimeout(s);var o=r[e];if(delete r[e],f.parentNode&&f.parentNode.removeChild(f),o&&o.forEach((e=>e(a))),t)return t(a)},s=setTimeout(l.bind(null,void 0,{type:"timeout",target:f}),12e4);f.onerror=l.bind(null,f.onerror),f.onload=l.bind(null,f.onload),c&&document.head.appendChild(f)}},d.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},d.p="/",d.gca=function(e){return e={17896441:"401",a94703ab:"48",a7bd4aaa:"98","1a4e3797":"138",b38399eb:"222","68e633d4":"254","56b0b38a":"356","717a4525":"365",a4b529fe:"399",f217256c:"497",ede3a018:"504","003b49f9":"506","22dd74f7":"567","3c0a97de":"597","946bd85a":"610","5e95c892":"647","6794d4cd":"680",aba21aa0:"742",ba8b3534:"815","23abe487":"911",ec3f407b:"931",c141421f:"957","5ca74542":"984"}[e]||e,d.p+d.u(e)},(()=>{var e={354:0,869:0};d.f.j=(t,a)=>{var r=d.o(e,t)?e[t]:void 0;if(0!==r)if(r)a.push(r[2]);else if(/^(354|869)$/.test(t))e[t]=0;else{var o=new Promise(((a,o)=>r=e[t]=[a,o]));a.push(r[2]=o);var n=d.p+d.u(t),f=new Error;d.l(n,(a=>{if(d.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=a&&("load"===a.type?"missing":a.type),n=a&&a.target&&a.target.src;f.message="Loading chunk "+t+" failed.\n("+o+": "+n+")",f.name="ChunkLoadError",f.type=o,f.request=n,r[1](f)}}),"chunk-"+t,t)}},d.O.j=t=>0===e[t];var t=(t,a)=>{var r,o,n=a[0],f=a[1],c=a[2],b=0;if(n.some((t=>0!==e[t]))){for(r in f)d.o(f,r)&&(d.m[r]=f[r]);if(c)var i=c(d)}for(t&&t(a);b - + diff --git a/contributing/commit-convention.html b/contributing/commit-convention.html index 5eb487f..4868040 100644 --- a/contributing/commit-convention.html +++ b/contributing/commit-convention.html @@ -14,7 +14,7 @@ - + diff --git a/contributing/contribution-guide.html b/contributing/contribution-guide.html index f5566ce..0354371 100644 --- a/contributing/contribution-guide.html +++ b/contributing/contribution-guide.html @@ -14,7 +14,7 @@ - + diff --git a/contributing/funding.html b/contributing/funding.html index 5001790..97b05c7 100644 --- a/contributing/funding.html +++ b/contributing/funding.html @@ -14,7 +14,7 @@ - + diff --git a/index.html b/index.html index cda165b..a624f26 100644 --- a/index.html +++ b/index.html @@ -14,7 +14,7 @@ - + diff --git a/interactions/message-interactions.html b/interactions/message-interactions.html index 796a31e..94d67f5 100644 --- a/interactions/message-interactions.html +++ b/interactions/message-interactions.html @@ -14,7 +14,7 @@ - + @@ -23,6 +23,6 @@

Button

Buttons are interactive components that render on messages. They can be clicked by users, and send an interaction to your app when clicked.

Buttons -
src/app.components.ts
import { Injectable } from '@nestjs/common';
import { Context, Button, ButtonContext, ComponentParam, On, TextCommandContext } from '@globalart/nestcord';
import { Markup, Telegraf } from 'telegraf';

@Injectable()
export class AppService {
constructor(private readonly client: Telegraf) {

}
getHello(): string {
return 'Hello World!';
}

@TextCommand({
name: 'start',
description: 'Displays this help message.',
})
onStart(@Context() [ctx]: TextCommandContext) {
const inlineKeyboard = Markup.inlineKeyboard([
{
text: 'Button 1',
callback_data: 'nestgram/button1',
},
{
text: 'Button 2',
callback_data: 'nestgram/button2',
},
])

ctx.reply('Start message', inlineKeyboard);
}

@Button('nestgram/:name')
async handleClickButton(@Context() ctx: ButtonContext, @ComponentParam('name') name: string) {
await ctx.reply(`clicked on ${name}`);
}
}
+
src/app.components.ts
import { Injectable } from '@nestjs/common';
import { Context, Button, ButtonContext, ComponentParam, On, TextCommandContext } from '@nestgramjs/core';
import { Markup, Telegraf } from 'telegraf';

@Injectable()
export class AppService {
constructor(private readonly client: Telegraf) {

}
getHello(): string {
return 'Hello World!';
}

@TextCommand({
name: 'start',
description: 'Displays this help message.',
})
onStart(@Context() [ctx]: TextCommandContext) {
const inlineKeyboard = Markup.inlineKeyboard([
{
text: 'Button 1',
callback_data: 'nestgram/button1',
},
{
text: 'Button 2',
callback_data: 'nestgram/button2',
},
])

ctx.reply('Start message', inlineKeyboard);
}

@Button('nestgram/:name')
async handleClickButton(@Context() ctx: ButtonContext, @ComponentParam('name') name: string) {
await ctx.reply(`clicked on ${name}`);
}
}
\ No newline at end of file diff --git a/search.html b/search.html index 919d529..21428d0 100644 --- a/search.html +++ b/search.html @@ -14,7 +14,7 @@ - + diff --git a/sw.js b/sw.js index 9110102..393f54c 100644 --- a/sw.js +++ b/sw.js @@ -4554,7 +4554,7 @@ function getPossibleURLs(url) { (async () => { const params = parseSwParams(); // eslint-disable-next-line no-underscore-dangle - const precacheManifest = [{"revision":"9c8c51ba5782f5310663d887896a42b1","url":"__docusaurus/debug.html"},{"revision":"fa7c9008eb2910f5457148bde5e288cd","url":"__docusaurus/debug/config.html"},{"revision":"01748070bb44245e307f0ad8a29669f2","url":"__docusaurus/debug/content.html"},{"revision":"d413d9eae172efd1657bf034b700ace9","url":"__docusaurus/debug/globalData.html"},{"revision":"5219bb719618f8e4a5b05f8d22e10fea","url":"__docusaurus/debug/metadata.html"},{"revision":"686a7a05c09f4752559752d2c2acb2f7","url":"__docusaurus/debug/registry.html"},{"revision":"105b1dece7086d50668ed19bbd5ae282","url":"__docusaurus/debug/routes.html"},{"revision":"4070ac87a09a09eea79d7c1aae880b2d","url":"404.html"},{"revision":"c241b1e830b64be7ae68d3181d3de0a6","url":"assets/css/styles.f179d114.css"},{"revision":"89966e16ee5c9907cb9f3f422b87a72f","url":"assets/js/003b49f9.12210af2.js"},{"revision":"b78faca260d8cb3e03338dc4cf8f0e17","url":"assets/js/152.2879f71a.js"},{"revision":"6fa6f261fc67ca18f662da5abd07d036","url":"assets/js/17896441.1d360417.js"},{"revision":"516274704cb2dd46bb41b2c77a237676","url":"assets/js/1a4e3797.73f56dac.js"},{"revision":"189b6be71e43d3e92d48a5cd280fd2ae","url":"assets/js/22dd74f7.f2c1f917.js"},{"revision":"12a2ef23f406107f05fb1435641dc4ca","url":"assets/js/23abe487.67a0649f.js"},{"revision":"9f3f89a4b9d0e1d1dbaeb21303f48455","url":"assets/js/3c0a97de.ab922ab4.js"},{"revision":"84468e7466b2140e887bf122ba61ec12","url":"assets/js/56b0b38a.d1d3b8e4.js"},{"revision":"6d91f7ba48fb8d534d75ed44392dc059","url":"assets/js/576.cdafb8cc.js"},{"revision":"a135d82e899848409aa62ceb5f03554c","url":"assets/js/591.902b1791.js"},{"revision":"9166e7f43ad8f684a53e187c73aca922","url":"assets/js/5ca74542.015ae1ff.js"},{"revision":"22810cc3758edec24f992c70ea7fc763","url":"assets/js/5e95c892.02078198.js"},{"revision":"3b4d5cfb4856697ac850fb1d30e8cd64","url":"assets/js/649.9a6961f8.js"},{"revision":"a77458d94ad4214308746311c24c30f3","url":"assets/js/6794d4cd.d6162667.js"},{"revision":"576deef15dbb7c3f5bdd3417d0d86deb","url":"assets/js/68e633d4.326c0945.js"},{"revision":"1785910d485a5cc900ddbb2bd0fff2e3","url":"assets/js/717a4525.d078597f.js"},{"revision":"3b014a55c8bc0e06d7f5eab9186a075b","url":"assets/js/82.24f8379a.js"},{"revision":"25d9a7780d498bb73d147d9460fb3458","url":"assets/js/883.96c53632.js"},{"revision":"94f683ed1d70c79c1d8541fbde43a765","url":"assets/js/903.266c3f77.js"},{"revision":"1805d7c9d62d1c1a3182a2114f713f82","url":"assets/js/946bd85a.b9fb3053.js"},{"revision":"a3b96957f067722cc0f672d30bb82fa5","url":"assets/js/a4b529fe.341c5d2e.js"},{"revision":"e3f807fd467d27c9aa71c24da992677d","url":"assets/js/a7bd4aaa.94b43be7.js"},{"revision":"3bff431bd885bd3c36bab2ca1c26bfa3","url":"assets/js/a94703ab.5f1134df.js"},{"revision":"9137f75b4d3f64d3490035c7b7f03687","url":"assets/js/aba21aa0.eb7bf6f2.js"},{"revision":"d45f166006e05d9c423a4b6536a23dfb","url":"assets/js/b38399eb.b50206ab.js"},{"revision":"4267c7ef7f4fd959fed058e1ef435405","url":"assets/js/ba8b3534.c212ece2.js"},{"revision":"babf611af288d78166ee5e8729cedf6e","url":"assets/js/c141421f.faee654a.js"},{"revision":"c4a9d2d96db8d4cd7689652ef75f176a","url":"assets/js/ec3f407b.9c77baaa.js"},{"revision":"ad472c4978ab977a42f1b402d0391faf","url":"assets/js/ede3a018.c7928b24.js"},{"revision":"9fe9589358cb2366d981a9ab25c5c171","url":"assets/js/f217256c.70a0c149.js"},{"revision":"82c2dcb6fb6b53aab681b15bcf77fa91","url":"assets/js/main.37423ad7.js"},{"revision":"ed78fb3f031baaa102738a799114e40e","url":"assets/js/runtime~main.87f217f1.js"},{"revision":"448041eca70df98c07855da979ff5d8f","url":"contributing/code-of-conduct.html"},{"revision":"9147f55c23f771cd52c51dfcf581b44b","url":"contributing/commit-convention.html"},{"revision":"242b62ae2779ecadb509b316b7892ea3","url":"contributing/contribution-guide.html"},{"revision":"c1aae4f7b5cbf4e71f75ef3a77627165","url":"contributing/funding.html"},{"revision":"2407e146ab2105f41e20adb2f6d7990c","url":"index.html"},{"revision":"cf31da36a4bcf3e5dc7e0c85787b0093","url":"interactions/message-interactions.html"},{"revision":"4ef29bfb99deeb2c01654880a0a79aa2","url":"manifest.json"},{"revision":"db731f6ee8c201bdee81cc7e45c29d97","url":"search.html"},{"revision":"e079d7d5155e9b236e4921272a257eea","url":"text-commands.html"},{"revision":"42074535ef68beb68f7335092da3afb8","url":"assets/images/text_command-782df5bb3c7d38123b1912df5b03d535.png"},{"revision":"03dbba9140788be5c06d9c65c928aece","url":"img/content/button.jpg"},{"revision":"42074535ef68beb68f7335092da3afb8","url":"img/content/text_command.png"},{"revision":"f43ddaffb2ecb4d2dace5f2e00c27509","url":"img/favicon.ico"},{"revision":"2698a4a2882cc09556e0f95c34a7ab2d","url":"img/icons/icon-72x72.png"},{"revision":"2698a4a2882cc09556e0f95c34a7ab2d","url":"img/logo-small.png"},{"revision":"b91591ef7b01350f7e1aac0e704501f1","url":"img/logo.png"},{"revision":"1f4646a0899ab726e00f5c86a9271222","url":"img/logo.svg"}]; + const precacheManifest = [{"revision":"7734a49e2a45411fbdf7dbd349983366","url":"__docusaurus/debug.html"},{"revision":"822e252e3cbf01c99ce50a3f31070a78","url":"__docusaurus/debug/config.html"},{"revision":"6178ba63f291f8515379679bffc6c0c2","url":"__docusaurus/debug/content.html"},{"revision":"e89c16246e3de4fbc0566ad2650b0dec","url":"__docusaurus/debug/globalData.html"},{"revision":"e33edfbdfc69046c7780373e23d1b80a","url":"__docusaurus/debug/metadata.html"},{"revision":"2c1332da306531b49ba0fd6636ec84bf","url":"__docusaurus/debug/registry.html"},{"revision":"dc5a92309cd3c307fb65f52b89c34429","url":"__docusaurus/debug/routes.html"},{"revision":"af556fc17f4c2182037824b5d42de530","url":"404.html"},{"revision":"c241b1e830b64be7ae68d3181d3de0a6","url":"assets/css/styles.f179d114.css"},{"revision":"89966e16ee5c9907cb9f3f422b87a72f","url":"assets/js/003b49f9.12210af2.js"},{"revision":"b78faca260d8cb3e03338dc4cf8f0e17","url":"assets/js/152.2879f71a.js"},{"revision":"6fa6f261fc67ca18f662da5abd07d036","url":"assets/js/17896441.1d360417.js"},{"revision":"516274704cb2dd46bb41b2c77a237676","url":"assets/js/1a4e3797.73f56dac.js"},{"revision":"189b6be71e43d3e92d48a5cd280fd2ae","url":"assets/js/22dd74f7.f2c1f917.js"},{"revision":"12a2ef23f406107f05fb1435641dc4ca","url":"assets/js/23abe487.67a0649f.js"},{"revision":"9f3f89a4b9d0e1d1dbaeb21303f48455","url":"assets/js/3c0a97de.ab922ab4.js"},{"revision":"fe524d28ba7564c594b93de3e19bc268","url":"assets/js/56b0b38a.e33a4d10.js"},{"revision":"6d91f7ba48fb8d534d75ed44392dc059","url":"assets/js/576.cdafb8cc.js"},{"revision":"a135d82e899848409aa62ceb5f03554c","url":"assets/js/591.902b1791.js"},{"revision":"9166e7f43ad8f684a53e187c73aca922","url":"assets/js/5ca74542.015ae1ff.js"},{"revision":"22810cc3758edec24f992c70ea7fc763","url":"assets/js/5e95c892.02078198.js"},{"revision":"3b4d5cfb4856697ac850fb1d30e8cd64","url":"assets/js/649.9a6961f8.js"},{"revision":"a77458d94ad4214308746311c24c30f3","url":"assets/js/6794d4cd.d6162667.js"},{"revision":"576deef15dbb7c3f5bdd3417d0d86deb","url":"assets/js/68e633d4.326c0945.js"},{"revision":"1785910d485a5cc900ddbb2bd0fff2e3","url":"assets/js/717a4525.d078597f.js"},{"revision":"3b014a55c8bc0e06d7f5eab9186a075b","url":"assets/js/82.24f8379a.js"},{"revision":"25d9a7780d498bb73d147d9460fb3458","url":"assets/js/883.96c53632.js"},{"revision":"94f683ed1d70c79c1d8541fbde43a765","url":"assets/js/903.266c3f77.js"},{"revision":"1805d7c9d62d1c1a3182a2114f713f82","url":"assets/js/946bd85a.b9fb3053.js"},{"revision":"a3b96957f067722cc0f672d30bb82fa5","url":"assets/js/a4b529fe.341c5d2e.js"},{"revision":"e3f807fd467d27c9aa71c24da992677d","url":"assets/js/a7bd4aaa.94b43be7.js"},{"revision":"3bff431bd885bd3c36bab2ca1c26bfa3","url":"assets/js/a94703ab.5f1134df.js"},{"revision":"9137f75b4d3f64d3490035c7b7f03687","url":"assets/js/aba21aa0.eb7bf6f2.js"},{"revision":"d45f166006e05d9c423a4b6536a23dfb","url":"assets/js/b38399eb.b50206ab.js"},{"revision":"4267c7ef7f4fd959fed058e1ef435405","url":"assets/js/ba8b3534.c212ece2.js"},{"revision":"babf611af288d78166ee5e8729cedf6e","url":"assets/js/c141421f.faee654a.js"},{"revision":"c4a9d2d96db8d4cd7689652ef75f176a","url":"assets/js/ec3f407b.9c77baaa.js"},{"revision":"ad472c4978ab977a42f1b402d0391faf","url":"assets/js/ede3a018.c7928b24.js"},{"revision":"9fe9589358cb2366d981a9ab25c5c171","url":"assets/js/f217256c.70a0c149.js"},{"revision":"82c2dcb6fb6b53aab681b15bcf77fa91","url":"assets/js/main.37423ad7.js"},{"revision":"71923d1cccf363f96b5d8ee0529b2ed5","url":"assets/js/runtime~main.09f9b340.js"},{"revision":"1635a323fad6edbf754d9d8b258ee363","url":"contributing/code-of-conduct.html"},{"revision":"6e61b66ca66ed53a9f8eb47b30e9f492","url":"contributing/commit-convention.html"},{"revision":"19eed27602607759379e4daa5f14e9db","url":"contributing/contribution-guide.html"},{"revision":"a0ae5b4a2f457afb2f45bd2094c88965","url":"contributing/funding.html"},{"revision":"e34076b311edcebe836c7a2d311fb757","url":"index.html"},{"revision":"d3316f6761edb1146b79288e8feb008d","url":"interactions/message-interactions.html"},{"revision":"4ef29bfb99deeb2c01654880a0a79aa2","url":"manifest.json"},{"revision":"9a4fe24174c4c33a7f6834febf815d06","url":"search.html"},{"revision":"b8c9d71c41eb1f6c5736726c04a2c4da","url":"text-commands.html"},{"revision":"42074535ef68beb68f7335092da3afb8","url":"assets/images/text_command-782df5bb3c7d38123b1912df5b03d535.png"},{"revision":"03dbba9140788be5c06d9c65c928aece","url":"img/content/button.jpg"},{"revision":"42074535ef68beb68f7335092da3afb8","url":"img/content/text_command.png"},{"revision":"f43ddaffb2ecb4d2dace5f2e00c27509","url":"img/favicon.ico"},{"revision":"2698a4a2882cc09556e0f95c34a7ab2d","url":"img/icons/icon-72x72.png"},{"revision":"2698a4a2882cc09556e0f95c34a7ab2d","url":"img/logo-small.png"},{"revision":"b91591ef7b01350f7e1aac0e704501f1","url":"img/logo.png"},{"revision":"1f4646a0899ab726e00f5c86a9271222","url":"img/logo.svg"}]; const controller = new workbox_precaching__WEBPACK_IMPORTED_MODULE_0__.PrecacheController({ // Safer to turn this true? fallbackToNetwork: true, diff --git a/text-commands.html b/text-commands.html index 5955cb1..0a915b6 100644 --- a/text-commands.html +++ b/text-commands.html @@ -14,7 +14,7 @@ - +