2
0
mirror of https://github.com/thedevs-network/the-guard-bot synced 2025-09-05 16:45:18 +00:00
Files
the-guard-bot/handlers/commands/leave.js

14 lines
302 B
JavaScript
Raw Normal View History

2017-09-28 22:59:35 +02:00
'use strict';
const { removeGroup } = require('../../stores/group');
const leaveCommandHandler = async ({ chat, telegram, state }) => {
const { isMaster } = state;
if (!isMaster) return null;
await removeGroup(chat);
return telegram.leaveChat(chat.id);
2017-09-28 22:59:35 +02:00
};
module.exports = leaveCommandHandler;