From 226576d4ddaba30aca4b7f0270773f82f3df1201 Mon Sep 17 00:00:00 2001 From: bangHasan Date: Thu, 23 Sep 2021 21:51:29 +0700 Subject: [PATCH] build 6 --- core/00 version.js | 6 +-- docs/init.md | 88 --------------------------------------- docs/lumpia.md | 8 +++- docs/updateType.md | 101 --------------------------------------------- package.json | 10 ++--- readme.md | 4 +- 6 files changed, 17 insertions(+), 200 deletions(-) delete mode 100644 docs/init.md delete mode 100644 docs/updateType.md diff --git a/core/00 version.js b/core/00 version.js index 25b07be..4b4da89 100644 --- a/core/00 version.js +++ b/core/00 version.js @@ -38,8 +38,8 @@ Release public pertama kali : const dev = false; //const active = 'alpha'; -const active = 'beta'; -//const active = 'stable'; +//const active = 'beta'; +const active = 'stable'; const app = { alpha: { @@ -50,7 +50,7 @@ const app = { }, stable: { name: 'lumpia', - build: 5, + build: 6, id: { legacy: 'MUD_wfLskZT2D99lRXLh94vvg_do21SJR', new: '1Yo6vQRwjG5Gl9jeEF0g2tBTUa0XN5MyT4G_HeDpRr9DvabxhRcSdhPNj' diff --git a/docs/init.md b/docs/init.md deleted file mode 100644 index 3f8db9a..0000000 --- a/docs/init.md +++ /dev/null @@ -1,88 +0,0 @@ -# Base - -## lumpia - -Yang dipergunakan dalam dokumentasi ini adalah versi stabil, yakni `lumpia`. - -huruf besar kecil adalah beda (pengaruh) pada saat coding. - -### init - -Inisiasi saat pertama kali lumpia dipanggil. - -syntax: `lumpia.init(token, options)` - -Parameter: - -- **token** (wajib) adalah token bot yang di dapat dari @botfather -- _options_ dalam format JSON: - - `prefix_command` default `/` - - `log_id` diisi id user/grup/channel. Jika ada error saat menjalankan program, akan dikirim ke log_id ini. - -```javascript -const token = '123456:abcde'; -const adminbot = 963852741; -const bot = lumpia.init(token, { - log_id: adminbot, - prefix_command: '.!/' -}); -``` - -### button - -bantuan untuk saat membuat button keyboard inline - -- `text(text, data, hide=false)` -- `url(text, url, hide=false)` - -untuk bantuan markup lainnya, cek pada method **markup**. - -### DEBUG - -Memaksa bot menampilkan JSON **apapun** yang diterima ke `log_id` yang diseting saat pertama kali init. - -Berguna untuk debugging isi message. - -- default: `false` - -### fetch - -periksa pada panduan fetch - -### userDB - -merupakan kelas pengakses properti user. -periksa halaman **userDB** - -### helper - -periksa halaman helper - -### markup - -periksa halaman markup - -### verbose - -mengaktifkan informasi logging saat menjalankan fungsi pada editor. - -- default: `false`; - -```javascript -lumpia.verbose = true; -``` - -### version - -berupa tipe data json bersifat informasi. - -- `active` versi yang aktif saat ini -- `number` selalu `3`, sesuai generasi yang direlease -- `build` nomor saat di build, terus bertambah -- `name` nama code library -- `full` penyebuatan secara penuh - -```javascript -let versi_info = `Bot ini dibuat dengan menggunakan lumpia ${lumpia.version.full}`; -Logger.log(versi_info); -``` \ No newline at end of file diff --git a/docs/lumpia.md b/docs/lumpia.md index 7b1b0dc..b29a002 100644 --- a/docs/lumpia.md +++ b/docs/lumpia.md @@ -1,13 +1,17 @@ ## Versi -## v4.0 +## v3.6 + +- replyIt WithHTML, WithVoice, WithAudio, WithDocument, ... + +## v3.5 - change: _prototype_ helper and button to _class_ - publikasi class EventEmitter - shorthand `bot.tg` for `bot.telegram` - fix version number -### v1.0 +### v3.1 First public release on `10 Agustus 2021` / `1 Muharam 1443 H` diff --git a/docs/updateType.md b/docs/updateType.md deleted file mode 100644 index 139fcfc..0000000 --- a/docs/updateType.md +++ /dev/null @@ -1,101 +0,0 @@ -## Update Type - -Di pergunakan saat deteksi trigger `on`. - -```javascript -bot.on('message', ()=>{}); -bot.on('photo', ()=>{}); - -// ... etc -``` - -Tipe update tersedia adalah sebagai berikut. Keterangan masing-masing tipe ada di dalam referensi sumber asli. - -### Type - -- raw (at `v2.0`) -- message -- edited_message -- channel_post -- edited_channel_post -- inline_query -- chosen_inline_result -- callback_query -- shipping_query -- pre_checkout_query -- poll -- poll_answer -- my_chat_member -- chat_member - -Ref: [update](https://core.telegram.org/bots/api#update) - -### Sub Type - -- text -- reply_to_message -- reply_markup -- via_bot -- edit_date -- author_signature -- entities -- animation -- audio -- document -- photo -- sticker -- video -- video_note -- voice -- caption -- caption_entities -- media_group_id -- contact -- dice -- game -- poll -- venue -- location -- new_chat_members -- left_chat_member -- new_chat_title -- new_chat_photo -- delete_chat_photo -- group_chat_created -- supergroup_chat_created -- channel_chat_created -- message_auto_delete_timer_changed -- migrate_to_chat_id -- migrate_from_chat_id -- pinned_message -- invoice -- successful_payment -- connected_website -- passport_data -- proximity_alert_triggered -- voice_chat_scheduled -- voice_chat_started -- voice_chat_ended -- voice_chat_participants_invited - -Ref: [message](https://core.telegram.org/bots/api#message) - -### Entity Type - -- `mention` @username -- `hashtag` #hashtag -- `cashtag` $USD -- `bot_command` /start@jobs_bot -- `url` https://telegram.org -- `email` do-not-reply@telegram.org -- `phone_number` +1-212-555-0123 -- `bold` **bold text** -- `italic` _italic text_ -- `underline` underlined text -- `strikethrough` strikethrough text -- `code` monowidth string -- `pre` monowidth block -- `text_link` for clickable text URLs -- `text_mention` for users without usernames - -Ref: [Entity](https://core.telegram.org/bots/api#messageentity) diff --git a/package.json b/package.json index d6e8919..3c2defd 100644 --- a/package.json +++ b/package.json @@ -1,11 +1,11 @@ { - "name": "gaslibv3_dev", - "version": "1.0.0", - "description": "GAS Lib v3 dev", - "main": "main.js", + "name": "gaslibv3", + "version": "3.6.0", + "description": "GAS Lib v3 - lumpia", + "main": "none.js", "scripts": { "test": "echo \"Error: no test specified\" && exit 1" }, - "author": "", + "author": "bangHasan", "license": "ISC" } diff --git a/readme.md b/readme.md index 4046350..f6c1ef1 100644 --- a/readme.md +++ b/readme.md @@ -30,7 +30,9 @@ bot.start(ctx => ctx.reply('Lets Go')); bot.cmd('ping', ctx => ctx.replyIt('Pong!')); -bot.hears(/hello/i, ctx => ctx.replyIt('Hello too!')); +bot.hears(/hello/i, ctx => ctx.reply('Hello too!')); + +bot.hears(/^\/say (.*)/i, ctx => ctx.replyIt(ctx.match[1])); ``` ## Docs