Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- async function invite(bot, message){
- let botInfo = await bot.getMe(),
- botStats = await bot.getChatMember(message.chat.id,botInfo.id);
- if(botStats.status != "administrator" || botStats.can_invite_users == false){
- bot.sendMessage(message.chat.id,"No tengo permisos. (esto se debe a que no soy administradora o no tengo permisos de invitar)");
- }else{
- bot.exportChatInviteLink(message.chat.id);
- let chatInfo = await bot.getChat(message.chat.id);
- bot.sendMessage(message.chat.id, `Aqui tienes un ticket de entrada [🎟](${chatInfo.invite_link})`, {parse_mode : "Markdown"});
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement