utilitas 1995.3.37 → 1995.3.39
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/dist/utilitas.lite.mjs +1 -1
- package/dist/utilitas.lite.mjs.map +1 -1
- package/lib/bot.mjs +10 -13
- package/lib/manifest.mjs +2 -2
- package/package.json +2 -2
package/lib/bot.mjs
CHANGED
|
@@ -781,6 +781,9 @@ const subconscious = [{
|
|
|
781
781
|
},
|
|
782
782
|
}, {
|
|
783
783
|
run: true, priority: -8830, name: 'history', func: async (ctx, next) => {
|
|
784
|
+
if (ctx.type === 'callback_query') {
|
|
785
|
+
await ctx.deleteMessage(ctx.m.message_id);
|
|
786
|
+
}
|
|
784
787
|
const regex = '[-—]+skip=[0-9]*';
|
|
785
788
|
let result;
|
|
786
789
|
const keyWords = ctx.cmd.args.replace(new RegExp(regex, 'i'), '').trim();
|
|
@@ -813,7 +816,6 @@ const subconscious = [{
|
|
|
813
816
|
break;
|
|
814
817
|
}
|
|
815
818
|
for (const i in result) {
|
|
816
|
-
const lastPage = ~~i === result.length - 1;
|
|
817
819
|
const content = lines([
|
|
818
820
|
...result[i].response_text ? [
|
|
819
821
|
`- ↩️ ${compactLimit(result[i].response_text)}`
|
|
@@ -827,19 +829,14 @@ const subconscious = [{
|
|
|
827
829
|
}, disable_notification: ~~i > 0,
|
|
828
830
|
}));
|
|
829
831
|
await ctx.timeout();
|
|
830
|
-
lastPage && await editMessageText(
|
|
831
|
-
ctx, true, lastItem(ctx.done).message_id, content,
|
|
832
|
-
getExtra(ctx, {
|
|
833
|
-
reply_parameters: {
|
|
834
|
-
message_id: null,
|
|
835
|
-
}, buttons: [{
|
|
836
|
-
label: '🔍 More',
|
|
837
|
-
text: `/search@${ctx.botInfo.username} ${keyWords} `
|
|
838
|
-
+ `--skip=${offset + result.length}`,
|
|
839
|
-
}]
|
|
840
|
-
})
|
|
841
|
-
);
|
|
842
832
|
}
|
|
833
|
+
ctx.done.push(await reply(ctx, true, '___', getExtra(ctx, {
|
|
834
|
+
buttons: [{
|
|
835
|
+
label: '🔍 More',
|
|
836
|
+
text: `/search@${ctx.botInfo.username} ${keyWords} `
|
|
837
|
+
+ `--skip=${offset + result.length}`,
|
|
838
|
+
}]
|
|
839
|
+
})));
|
|
843
840
|
result.length || await ctx.er('No more records.');
|
|
844
841
|
}, help: lines([
|
|
845
842
|
'Search history.',
|
package/lib/manifest.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const manifest = {
|
|
2
2
|
"name": "utilitas",
|
|
3
3
|
"description": "Just another common utility for JavaScript.",
|
|
4
|
-
"version": "1995.3.
|
|
4
|
+
"version": "1995.3.39",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/utilitas",
|
|
7
7
|
"main": "index.mjs",
|
|
@@ -26,7 +26,7 @@ const manifest = {
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
28
28
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
29
|
-
"@google-cloud/aiplatform": "^3.
|
|
29
|
+
"@google-cloud/aiplatform": "^3.22.0",
|
|
30
30
|
"@google-cloud/speech": "^6.6.0",
|
|
31
31
|
"@google-cloud/storage": "^7.11.1",
|
|
32
32
|
"@google-cloud/text-to-speech": "^5.3.0",
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "utilitas",
|
|
3
3
|
"description": "Just another common utility for JavaScript.",
|
|
4
|
-
"version": "1995.3.
|
|
4
|
+
"version": "1995.3.39",
|
|
5
5
|
"private": false,
|
|
6
6
|
"homepage": "https://github.com/Leask/utilitas",
|
|
7
7
|
"main": "index.mjs",
|
|
@@ -37,7 +37,7 @@
|
|
|
37
37
|
"devDependencies": {
|
|
38
38
|
"@ffmpeg-installer/ffmpeg": "^1.1.0",
|
|
39
39
|
"@ffprobe-installer/ffprobe": "^2.1.2",
|
|
40
|
-
"@google-cloud/aiplatform": "^3.
|
|
40
|
+
"@google-cloud/aiplatform": "^3.22.0",
|
|
41
41
|
"@google-cloud/speech": "^6.6.0",
|
|
42
42
|
"@google-cloud/storage": "^7.11.1",
|
|
43
43
|
"@google-cloud/text-to-speech": "^5.3.0",
|