halbot 1995.1.11 → 1995.1.12

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "halbot",
3
3
  "description": "Just another AI powered Telegram bot, which is simple design, easy to use, extendable and fun.",
4
- "version": "1995.1.11",
4
+ "version": "1995.1.12",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/halbot",
7
7
  "type": "module",
@@ -61,12 +61,17 @@ const collectFile = async (ctx, f) => {
61
61
  };
62
62
 
63
63
  const extract = async (ctx, m) => {
64
- collectableObjects.map(k => m[k] && ctx.collect(
65
- bot.lines([
66
- '---', metaPrompt, `type: ${k}`,
67
- '---', JSON.stringify(m[k])
68
- ]), PROMPT
69
- ));
64
+ collectableObjects.map(k => {
65
+ if (k === 'new_chat_member' && m[k].user.id === ctx.botInfo.id) {
66
+ return; // ignore current bot joining the group
67
+ }
68
+ return m[k] && ctx.collect(
69
+ bot.lines([
70
+ '---', metaPrompt, `type: ${k}`,
71
+ '---', JSON.stringify(m[k])
72
+ ]), PROMPT
73
+ );
74
+ });
70
75
  await Promise.all(collectableFiles.map(async k => {
71
76
  if (!m[k]) { return; }
72
77
  await sendInit(ctx, EMOJI_LOOK);