UNPKG

xwa-api

Version:
122 lines (112 loc) 8.03 kB
/*COPYRIGHT (C) 2022 CODED BY NOIZE */ const Garfield = require('../events'); const {MessageType, MessageOptions} = require('@adiwajshing/baileys'); const Config = require('../config'); // ==================== MAIN DESCRIPTION TEXT ==================== const h_Des = "Yardım menüsünden botu kullanım hakkında bilgi verir." const h_DedEN = "Gives information about using the bot from the Help menu." const matchnullEN = "v6.0 Update logs ?\n*? Introducing the Aurora*\n*?Collaborating with X-Nodes Server*\n*? Fixed Audio and Video Error*\n*? Making it easy to make bot*\n*? Add new ttp modules*\n*? Increased the speed of the bot*\n*? and many more...*" const matchnull = "v6.0 Update logs ?\n*? Introducing the Aurora*\n*?Collaborating with X-Nodes Server*\n*? Fixed Audio and Video Error*\n*? Making it easy to make bot*\n*? Add new ttp modules*\n*? Increased the speed of the bot*\n*? and many more...*" const notfound = "```Almak istediğiniz yardım bulunamadı!```\n```Lütfen daha açıklayıcı bir şekilde sorunu belirtin.```" const notfoundEN = "```The help you wanted to get was not found!```\n```Please state the problem in a more descriptive way.```" // ==================== ALL DESCRİPTİONS ==================== const pubTR = "Botunuzu public yapmak komutları herkese açık yapacaktır. Public yapıldıktan sonra kullanıcı sadece kişisel ve admin komutlarını kullanabilir hale gelir. Onun dışında komutları kullanamaz.\nBotunuzu public yapmak için *.setvar WORK_TYPE:public* komutunu kullanın." const pubEN = "Making your bot public will make the commands public. After it is made public, the user can only use personal and admin commands. User cannot use commands other than this.\n To make your bot public, type *.setvar WORK_TYPE:public*" const blTR = "BlockChat botunu belirlediğiniz gruba, kişiye veya birden fazla sohbete kapatır.\nKullanmak için önce sohbete gidip *.jid* yazın. Daha sonra gelen *90xxx-xxx@g.us veya 90xxx@whatsapp.net* yazısını kopyalayın. (@g.us ve @whatsapp.net'i silin!)\nArdından *.setvar BLOCK_CHAT:id && id1,id2...* komutunu kullanın." const sudoTR = "SUDO, botunuzu seçtiğiniz kullanıcıya tüm yetkileri ile paylaşır. Numara sonuna ,0 koyarsanız gruplarda da aktif hale gelir.\nKullanmak için *.setvar SUDO:90xxxx && 90xx,90xxx [ülke kodu ile, (�? +90xx �? �? 90xx)]" const privTR = "Botunuzu private yapmak komutları sadece size özel yapar. Başkaları kullanamaz.\nBotunuzu private yapmak için *.setvar WORK_TYPE:private* komutunu kullanın." const privEN = "Making your bot private makes commands private only for you. Anyone cannot use.\nTo make your bot private, type *.setvar WORK_TYPE:private*" const blEN = "Closes BlockChat bot to group, person or multiple chats you specify.\n To use it, first go to chat and type *.jid* Then copy to incoming code. (Except @g.us or @whatsapp.net!)\nThen use this command *.setvar BLOCK_CHAT:id && id1,id2..*" const sudoEN = "SUDO, Shares your bot to the user you choose with all its powers.If you put ,0 at the end of the number, the user can also use it in the group.\nTo use, type *.setvar SUDO:90xxxx && 90xx,90xxx [with county code, (�? +90xx �? �? 90xx)]*" if (Config.LANG == 'TR' || Config.LANG == 'AZ') { Garfield.addXnodes({pattern: 'logs?(.*)', fromMe: true, desc: h_Des}, (async (message, match) => { if (match[1] === '') { return await message.client.sendMessage( message.jid, matchnull, MessageType.text ); } else if ( (match[1].includes('public') && match[1].includes('nasıl')) || (match[1].includes('public') && match[1].includes('yapimi')) || (match[1].includes('public') && match[1].includes('yapımı')) || (match[1].includes('public') && match[1].includes('nedir')) || (match[1].includes('herkese') && match[1].includes('acik') || match[1].includes('açık')) ) { return await message.client.sendMessage( message.jid, pubTR, MessageType.text ); } else if ( (match[1].includes('private') && match[1].includes('nasıl')) || (match[1].includes('private') && match[1].includes('yapimi')) || (match[1].includes('private') && match[1].includes('yapımı')) || (match[1].includes('private') && match[1].includes('nedir')) || (match[1].includes('bana') && match[1].includes('özel')) ) { return await message.client.sendMessage( message.jid, privTR, MessageType.text ); } else if ( (match[1].includes('belirli') && match[1].includes('sohbet')) || (match[1].includes('sohbet') && match[1].includes('kapat')) || (match[1].includes('nasil') && match[1].includes('kapatabilirim')) || (match[1].includes('blockchat') && match[1].includes('nedir')) || (match[1].includes('sohbet') && match[1].includes('özel')) ) { return await message.client.sendMessage( message.jid, blTR, MessageType.text ); } else if ( (match[1].includes('SUDO') && match[1].includes('nedir')) || (match[1].includes('SUDO') && match[1].includes('nasil')) || (match[1].includes('botu') && match[1].includes('baskasina')) || (match[1].includes('botu') && match[1].includes('arkadaşıma')) || (match[1].includes('SUDO') && match[1].includes('kullanmak')) ) { return await message.client.sendMessage( message.jid, sudoTR, MessageType.text ); } else { return await message.client.sendMessage( message.jid, notfound, MessageType.text ); } })); } else { Garfield.addXnodes({pattern: 'logs?(.*)', fromMe: true, desc: h_DedEN}, (async (message, match) => { if (match[1] === '') { return await message.client.sendMessage( message.jid, matchnullEN, MessageType.text ); } else if ( (match[1].includes('public') && match[1].includes('how')) || (match[1].includes('public') && match[1].includes('set')) || (match[1].includes('public') && match[1].includes('setting')) ) { return await message.client.sendMessage( message.jid, pubEN, MessageType.text ); } else if ( (match[1].includes('private') && match[1].includes('how')) || (match[1].includes('private') && match[1].includes('set')) || (match[1].includes('private') && match[1].includes('setting')) ) { return await message.client.sendMessage( message.jid, privEN, MessageType.text ); } else if ( (match[1].includes('SUDO') && match[1].includes('usage')) || (match[1].includes('SUDO') && match[1].includes('what')) || (match[1].includes('how') && match[1].includes('SUDO')) || (match[1].includes('set') && match[1].includes('SUDO')) || (match[1].includes('share') && match[1].includes('bot')) ) { return await message.client.sendMessage( message.jid, sudoEN, MessageType.text ); } else if ( (match[1].includes('block') && match[1].includes('chat')) || (match[1].includes('how') && match[1].includes('block')) || (match[1].includes('close') && match[1].includes('bot')) || (match[1].includes('specific') && match[1].includes('chat')) || (match[1].includes('specific') && match[1].includes('set')) ) { return await message.client.sendMessage( message.jid, blEN, MessageType.text ); } else { return await message.client.sendMessage( message.jid, notfoundEN, MessageType.text ); } })); }