halbot 1995.1.10 → 1995.1.11

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.10",
4
+ "version": "1995.1.11",
5
5
  "private": false,
6
6
  "homepage": "https://github.com/Leask/halbot",
7
7
  "type": "module",
@@ -200,10 +200,14 @@ const action = async (ctx, next) => {
200
200
  + ctx._.message.new_chat_member.user.id + ' => '
201
201
  + ctx._.message.new_chat_member.status
202
202
  );
203
- if (ctx._.message.new_chat_member.user.id !== ctx.botInfo.id
204
- || ctx._.message.new_chat_member.status === 'left') {
203
+ if (ctx._.message.new_chat_member.user.id === ctx.botInfo.id
204
+ && ctx._.message.new_chat_member.status === 'left') {
205
205
  return ctx.finish();
206
- } else { ctx.hello(); }
206
+ } else if (ctx._.message.new_chat_member.user.id === ctx.botInfo.id) {
207
+ ctx.hello();
208
+ }
209
+ } else if (ctx._.message.group_chat_created) {
210
+ return ctx.finish();
207
211
  } else if (!ctx._.type) { return log(`Unsupported message type.`); }
208
212
  // get chat metadata
209
213
  ctx._.chatId = ctx._.message.chat.id;