Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- client.on('message', message => {
- ////Me codes
- if (message.content.startsWith(prefix + "createrole")) {
- if(!message.channel.guild) return message.channel.send('**This Command Only For Servers !**')///ذا السطر يقلك ما فيك تستخدم الامر خارج السيرفرات
- if (!message.member.hasPermission('MANAGE_ROLES')) return message.channel.send(`**${message.author.username} You Dont Have** ``MANAGE_ROLES`` **Premission**`);////ذا السطر منشان يلي ما معه بريميشن ما يقدر يعمل شي
- message.channel.send(`**اكتب اسم الرتبة الان** `);
- let filter = m => m.author.id === message.author.id;/////عبارة عن فلتر منشان اي شخص يضغط عل رياكشن غير الكاتب ما ينحسب
- var name = "";////فراغ للاسم منشان يسجله البوت
- let sugsa2 = message.channel////ذا سطر ماله ا همية
- .awaitMessages(filter, { max: 1, time: 60000 })////وقت كتابه الاسم وعدد المرات
- .then(co => {
- name = co.first().content;
- ////Me codes
- message.channel.send(`**اكتب لون الرتبة الان** `);
- let filter = f => f.author.id === message.author.id;
- var color = "";
- let sugsa2 = message.channel
- .awaitMessages(filter, { max: 1, time: 60000 })
- .then(co => {
- color = co.first().content;
- ////Me codes
- message.channel.send("هل تريد الرتبة في صلاحيات ادارية ام لا").then(msg => {
- msg.react('✅')
- .then(() => msg.react('✅'))///يحط رياكشن
- msg.react('❌')
- .then(() => msg.react('❌'))
- ////Me codes
- let noFilter = (reaction, user) => reaction.emoji.name === '❌' && user.id === message.author.id;////فلتر
- let noactive = msg.createReactionCollector(noFilter, { time: 120000 });///وقت
- ////Me codes
- let activeFilter = (reaction, user) => reaction.emoji.name === '✅' && user.id === message.author.id;
- let active = msg.createReactionCollector(activeFilter, { time: 120000 });
- active.on("collect", r => {//// الفعل يلي يصير اذا غضطت على رياكشن الصح
- ////Me codes
- message.guild.createRole({ name: name, color:color, permissions: ["ADMINISTRATOR"] })////الانشاء
- msg.delete();////مسح الرساله
- })
- noactive.on("collect", f => {
- message.guild.createRole({ name: name, color:color, permissions: [] })
- msg.delete();
- })
- }
- )
- })
- })
- }
- })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement