Advertisement
n3k4a

Server maker code

Feb 13th, 2020
2,166
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 16.88 KB | None | 0 0
  1.  
  2. /*هذا الكود تم نشره في سيرفر توكسك كودز
  3.  
  4. اذا زرفته ونشرته بي حقوقك بتعرض نفسك للباند من الدسكورد علي يدي :)*/
  5.  
  6. const Discord = require('discord.js');
  7. const client = new Discord.Client();
  8.  
  9. client.on("message", message =>{
  10. //السطر ال تحت لمنع تكرار انشاء الرتب لو عاوز تغير اسم الرتب غيرها وحط اسمها فى السطر ال تحت كمان علشان ميحصلش سبام
  11. let roles = message.guild.roles.find(all=> all.name === "⇁『KiNG 』‏‏༄ ❥", "⇁『LEADER』‏‏༄ ❥", "⇁『BiG BOSS 』‏‏༄ ❥", "⇁『CAPTAIN 』‏‏༄ ❥", "⇁『SERGEANT 』‏‏༄ ❥",
  12. "⇁『youtuber 』‏‏༄ ❥", "⇁『ACTIVE 』‏‏༄ ❥");//Baron#1500
  13. if(message.content.startsWith(prefix + "roles")) {//Baron#1500
  14. if(message.author.bot) return;//Baron#1500
  15. if(roles) return message.reply('**الرتب موجوده بالفعل**')//Baron#1500
  16. //دى بقا الرتب ال انت عاوزو يعملها
  17. let roleking = message.guild.roles.find(r => r.name === "⇁『KiNG 』‏‏༄ ❥");//Baron#1500
  18. if(!roleking) {
  19. message.guild.createRole({//Baron#1500
  20. name: '⇁『KiNG 』‏‏༄ ❥',
  21. color: 'RANDOM',
  22. position: (1),
  23. hoist: (true),
  24. permissions: 'ADMINISTRATOR'
  25. })
  26. }
  27. let roleleader = message.guild.roles.find(r => r.name === "⇁『LEADER』‏‏༄ ❥");//Baron#1500
  28. if(!roleleader) {
  29. message.guild.createRole({
  30. name: '⇁『LEADER』‏‏༄ ❥',
  31. color: 'RANDOM',
  32. position: (2),//Baron#1500
  33. hoist: (true),
  34. permissions: ['CREATE_INSTANT_INVITE', 'KICK_MEMBERS', 'BAN_MEMBERS', 'MANAGE_CHANNELS', 'ADD_REACTIONS', 'VIEW_AUDIT_LOG', 'VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES',
  35. 'SEND_TTS_MESSAGES', 'MANAGE_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'READ_MESSAGE_HISTORY', 'MENTION_EVERYONE', 'CONNECT', 'SPEAK', 'MUTE_MEMBERS', 'DEAFEN_MEMBERS',
  36. 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'MANAGE_NICKNAMES'],
  37. })
  38. }
  39. let rolebigboss = message.guild.roles.find(r => r.name === "⇁『BiG BOSS 』‏‏༄ ❥");//Baron#1500
  40. if(!rolebigboss) {
  41. message.guild.createRole({
  42. name: '⇁『BiG BOSS 』‏‏༄ ❥',
  43. color: 'RANDOM',
  44. position: (3),
  45. hoist: (true),
  46. permissions: ['CREATE_INSTANT_INVITE', 'KICK_MEMBERS', 'ADD_REACTIONS', 'VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'MANAGE_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK', 'MUTE_MEMBERS', 'DEAFEN_MEMBERS',
  47. 'READ_MESSAGE_HISTORY', 'MENTION_EVERYONE', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'MANAGE_NICKNAMES']
  48. })
  49. }
  50. let rolecaptain = message.guild.roles.find(r => r.name === "⇁『CAPTAIN 』‏‏༄ ❥");//Baron#1500
  51. if(!rolecaptain) {
  52. message.guild.createRole({
  53. name: '⇁『CAPTAIN 』‏‏༄ ❥',
  54. color: 'RANDOM',
  55. postion: (4),
  56. hoist: (true),
  57. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'MANAGE_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK', 'MUTE_MEMBERS', 'DEAFEN_MEMBERS',
  58. 'READ_MESSAGE_HISTORY', 'MENTION_EVERYONE', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME']
  59. })
  60. }
  61. let rolesergant = message.guild.roles.find(r => r.name === "⇁『SERGEANT 』‏‏༄ ❥");//Baron#1500
  62. if(!rolesergant) {
  63. message.guild.createRole({
  64. name: '⇁『SERGEANT 』‏‏༄ ❥',
  65. color: 'RANDOM',//Baron#1500
  66. postion: (5),
  67. hoist: (true),//Baron#1500
  68. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'MANAGE_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK', 'MUTE_MEMBERS',
  69. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME']
  70. })
  71. }//Baron#1500
  72. let roleyoutuber = message.guild.roles.find(r => r.name === "⇁『youtuber 』‏‏༄ ❥");
  73. if(!roleyoutuber) {//Baron#1500
  74. message.guild.createRole({
  75. name: '⇁『youtuber 』‏‏༄ ❥',
  76. color: 'RANDOM',
  77. postion: (6),
  78. hoist: (true),//Baron#1500
  79. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',
  80. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']
  81. })
  82. }
  83. let roleactive = message.guild.roles.find(r => r.name === "⇁『ACTIVE 』‏‏༄ ❥");//Baron#1500
  84. if(!roleactive) {//Baron#1500
  85. message.guild.createRole({
  86. name: '⇁『ACTIVE 』‏‏༄ ❥',
  87. color: 'RANDOM',
  88. postion: (7),
  89. hoist: (true),//Baron#1500
  90. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',//Baron#1500
  91. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']//Baron#1500
  92. })
  93. message.guild.createRole({//Baron#1500
  94. name: 'Fortnite',
  95. color: 'RANDOM',//Baron#1500
  96. postion: (7),
  97. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',//Baron#1500
  98. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']//Baron#1500
  99. })
  100. message.guild.createRole({//Baron#1500
  101. name: 'playerunknowns',
  102. color: 'RANDOM',
  103. postion: (7),
  104. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',
  105. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']//Baron#1500
  106. })//Baron#1500
  107. message.guild.createRole({
  108. name: 'counter-strike',
  109. color: 'RANDOM',//Baron#1500
  110. postion: (7),
  111. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',
  112. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']
  113. })//Baron#1500
  114. message.guild.createRole({
  115. name: 'creative-destruction',//Baron#1500
  116. color: 'RANDOM',
  117. postion: (7),
  118. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',
  119. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']
  120. })
  121. message.guild.createRole({//Baron#1500
  122. name: 'overwatch',
  123. color: 'RANDOM',
  124. postion: (7),//Baron#1500
  125. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',
  126. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']
  127. })//Baron#1500
  128. message.guild.createRole({
  129. name: 'minecraft',//Baron#1500
  130. color: 'RANDOM',
  131. postion: (7),//Baron#1500
  132. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',
  133. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']
  134. })//Baron#1500
  135. message.guild.createRole({//Baron#1500
  136. name: 'league-of-legends',
  137. color: 'RANDOM',//Baron#1500
  138. postion: (7),
  139. permissions: ['VIEW_CHANNEL', 'READ_MESSAGES', 'SEND_MESSAGES', 'EMBED_LINKS', 'ATTACH_FILES', 'CONNECT', 'SPEAK',
  140. 'READ_MESSAGE_HISTORY', 'MOVE_MEMBERS', 'USE_VAD', 'CHANGE_NICKNAME', 'ADD_REACTIONS']
  141. })//Baron#1500
  142. message.channel.send(message.member + '**جارى انشاء الرتب**').then((m)=> {
  143. setTimeout(() => {//Baron#1500
  144. m.edit('**تم انشاء الرتب بنجاح**')
  145. }, 3000);//Baron#1500
  146. })
  147. }//Baron#1500
  148. }
  149. })//Baron#1500
  150. Baron.on("message", message =>{
  151. let roleyoutuber = message.guild.roles.find(r => r.name === "⇁『youtuber 』‏‏༄ ❥");
  152. let rolepubg = message.guild.roles.find(r => r.name === "playerunknowns");
  153. let rolecsgo = message.guild.roles.find(r => r.name === "counter-strike");
  154. let rolecd = message.guild.roles.find(r => r.name === "creative-destruction");
  155. let roleow = message.guild.roles.find(r => r.name === "overwatch");
  156. let rolemc = message.guild.roles.find(r => r.name === "minecraft");
  157. let rolelol = message.guild.roles.find(r => r.name === "league-of-legends");
  158. let rolefortnite = message.guild.roles.find(r => r.name === "Fortnite");
  159. //Baron#1500
  160. let roles = message.guild.roles.find(all=> all.name === "⇁『KiNG 』‏‏༄ ❥", "⇁『LEADER』‏‏༄ ❥", "⇁『BiG BOSS 』‏‏༄ ❥", "⇁『CAPTAIN 』‏‏༄ ❥", "⇁『SERGEANT 』‏‏༄ ❥",
  161. "⇁『youtuber 』‏‏༄ ❥", "⇁『ACTIVE 』‏‏༄ ❥");//Baron#1500
  162. if(message.content.startsWith(prefix + "channels")) {
  163. if(!roles) return message.reply("**من فضلك قم بانشاء الرتب اولا اكتب $roles**")//Baron#1500
  164. if(roles) {//Baron#1500
  165. message.reply("**جارى انشاء الرومات**").then((c)=> {//Baron#1500
  166. setTimeout(() => {
  167. c.edit("**تم انشاء الرومات بنجاح**")//Baron#1500
  168. }, 10000);
  169. })
  170. message.guild.createChannel(`${message.guild.name}-TEXT` , 'category').then(tb => {//Baron#1500
  171. message.guild.createChannel('welcome' , 'text').then(nws => {
  172. nws.setParent(tb);
  173. nws.overwritePermissions(message.guild.id, {
  174. SEND_MESSAGES: false,
  175. MENTION_EVERYONE: false//Baron#1500
  176. })
  177. })
  178. message.guild.createChannel('info' , 'text').then(inf => {//Baron#1500
  179. inf.setParent(tb);//Baron#1500
  180. inf.overwritePermissions(message.guild.id, {//Baron#1500
  181. SEND_MESSAGES: false,
  182. MENTION_EVERYONE: false//Baron#1500
  183. })
  184. })
  185. message.guild.createChannel('news' , 'text').then(nws => {//Baron#1500
  186. nws.setParent(tb);
  187. nws.overwritePermissions(message.guild.id, {//Baron#1500
  188. SEND_MESSAGES: false,
  189. MENTION_EVERYONE: false//Baron#1500
  190. })
  191. })//Baron#1500
  192. message.guild.createChannel('chat' , 'text').then(cht => {//Baron#1500
  193. cht.setParent(tb);
  194. cht.overwritePermissions(message.guild.id, {
  195. MENTION_EVERYONE: false//Baron#1500
  196. })
  197. })
  198. message.guild.createChannel('bot-commands' , 'text').then(cmd => {//Baron#1500
  199. cmd.setParent(tb);
  200. cmd.overwritePermissions(message.guild.id, {//Baron#1500
  201. MENTION_EVERYONE: false//Baron#1500
  202. })
  203. })
  204. message.guild.createChannel('youtubers' , 'text').then(yt => {//Baron#1500
  205. yt.setParent(tb);//Baron#1500
  206. yt.overwritePermissions(roleyoutuber, {
  207. SEND_MESSAGES: true
  208. })
  209. yt.overwritePermissions(message.guild.id, {//Baron#1500
  210. SEND_MESSAGES: false,
  211. MENTION_EVERYONE: false
  212. })
  213. })//Baron#1500
  214. message.guild.createChannel('pic' , 'text').then(pic => {//Baron#1500
  215. pic.setParent(tb);
  216. pic.overwritePermissions(message.guild.id, {
  217. MENTION_EVERYONE: false
  218. })
  219. })
  220. message.guild.createChannel('cut-tweet' , 'text').then(cut => {
  221. cut.setParent(tb);
  222. cut.overwritePermissions(message.guild.id, {
  223. MENTION_EVERYONE: false
  224. })//Baron#1500
  225. })
  226. })
  227. message.guild.createChannel(`Games-Chat` , 'category').then(tb => {//Baron#1500
  228. message.guild.createChannel('Fortnite' , 'text').then(wlc => {
  229. wlc.setParent(tb);
  230. wlc.overwritePermissions(message.guild.id, {
  231. SEND_MESSAGES: false,
  232. MENTION_EVERYONE: false
  233. })//Baron#1500
  234. wlc.overwritePermissions(rolefortnite, {
  235. SEND_MESSAGES: true,
  236. MENTION_EVERYONE: false
  237. })
  238. })//Baron#1500
  239. message.guild.createChannel('playerunknowns' , 'text').then(ch => {//Baron#1500
  240. ch.setParent(tb);
  241. ch.overwritePermissions(message.guild.id, {//Baron#1500
  242. SEND_MESSAGES: false,
  243. MENTION_EVERYONE: false
  244. })
  245. ch.overwritePermissions(rolepubg, {//Baron#1500
  246. SEND_MESSAGES: true,
  247. MENTION_EVERYONE: false//Baron#1500
  248. })
  249. })
  250. message.guild.createChannel('counter-strike' , 'text').then(ch => {//Baron#1500
  251. ch.setParent(tb);
  252. ch.overwritePermissions(message.guild.id, {
  253. SEND_MESSAGES: false,//Baron#1500
  254. MENTION_EVERYONE: false
  255. })
  256. ch.overwritePermissions(rolecsgo, {
  257. SEND_MESSAGES: true,
  258. MENTION_EVERYONE: false
  259. })//Baron#1500
  260. })
  261. message.guild.createChannel('creative-destruction' , 'text').then(ch => {//Baron#1500
  262. ch.setParent(tb);
  263. ch.overwritePermissions(rolecd, {
  264. SEND_MESSAGES: true,//Baron#1500
  265. MENTION_EVERYONE: false
  266. })
  267. ch.overwritePermissions(message.guild.id, {
  268. SEND_MESSAGES: false,
  269. MENTION_EVERYONE: false
  270. })//Baron#1500
  271. })
  272. message.guild.createChannel('overwatch' , 'text').then(ch => {
  273. ch.setParent(tb);
  274. ch.overwritePermissions(roleow, {
  275. SEND_MESSAGES: true,
  276. MENTION_EVERYONE: false
  277. })
  278. ch.overwritePermissions(message.guild.id, {
  279. SEND_MESSAGES: false,
  280. MENTION_EVERYONE: false
  281. })
  282. })
  283. message.guild.createChannel('minecraft' , 'text').then(ch => {
  284. ch.setParent(tb);
  285. ch.overwritePermissions(rolemc, {
  286. SEND_MESSAGES: true,
  287. MENTION_EVERYONE: false
  288. })
  289. ch.overwritePermissions(message.guild.id, {
  290. SEND_MESSAGES: false,
  291. MENTION_EVERYONE: false
  292. })
  293. })
  294. message.guild.createChannel('league-of-legends' , 'text').then(ch => {
  295. ch.setParent(tb);
  296. ch.overwritePermissions(rolelol, {
  297. SEND_MESSAGES: true,
  298. MENTION_EVERYONE: false
  299. })
  300. ch.overwritePermissions(message.guild.id, {
  301. SEND_MESSAGES: false,
  302. MENTION_EVERYONE: false
  303. })
  304. })
  305. })
  306. message.guild.createChannel(`.${message.guild.name} | 🔊 .` , 'category').then(tb => {
  307. message.guild.createChannel('「الـقـرأن الـكـريــم | 📜」' , 'voice').then(ch => {
  308. ch.setParent(tb);
  309. ch.overwritePermissions(message.guild.id, {
  310. SPEAK: false//Baron#1500
  311. })
  312. message.guild.createChannel('「Events | 🎲 .」' , 'voice').then(ch => {
  313. ch.setParent(tb);
  314. ch.setUserLimit(50)//Baron#1500
  315. ch.overwritePermissions(message.guild.id, {
  316. SPEAK: false,
  317. //Baron#1500
  318. })
  319. })
  320. })
  321. })
  322. message.guild.createChannel(`.Talking | ✋🏽 .` , 'category').then(tb => {
  323. message.guild.createChannel(`「${message.guild.name} | 🔊 .」` , 'voice').then(ch => {
  324. ch.setParent(tb);
  325. ch.setUserLimit(50)//Baron#1500
  326. })
  327. message.guild.createChannel('「Sounds | ♫ .」' , 'voice').then(ch => {
  328. ch.setParent(tb);
  329. ch.setUserLimit(50)//Baron#1500
  330. })
  331. })
  332. message.guild.createChannel(`» Games | الالعاب .` , 'category').then(tb => {
  333. message.guild.createChannel(`Fortnite | فورتنآيت .` , 'voice').then(ch => {
  334. ch.setParent(tb);
  335. ch.overwritePermissions(message.guild.id, {
  336. CONNECT: false,
  337.  
  338. })
  339. ch.overwritePermissions(rolefortnite, {
  340. CONNECT: true,
  341.  
  342. })
  343. })//Baron#1500
  344. message.guild.createChannel('Minecraft | مآينكرآفت' , 'voice').then(ch => {
  345. ch.setParent(tb);
  346. ch.overwritePermissions(message.guild.id, {
  347. CONNECT: false,
  348.  
  349. })
  350. ch.overwritePermissions(rolemc, {
  351. CONNECT: true,
  352.  
  353. })
  354. })//Baron#1500
  355. message.guild.createChannel(`Creative | كريآتف .` , 'voice').then(ch => {
  356. ch.setParent(tb);
  357. ch.overwritePermissions(message.guild.id, {
  358. CONNECT: false,
  359.  
  360. })
  361. ch.overwritePermissions(rolecd, {
  362. CONNECT: true,//Baron#1500
  363.  
  364. })
  365. })
  366. message.guild.createChannel('Legends | لوول' , 'voice').then(ch => {
  367. ch.setParent(tb);
  368. ch.overwritePermissions(message.guild.id, {
  369. CONNECT: false,
  370.  
  371. })
  372. ch.overwritePermissions(rolelol, {
  373. CONNECT: true,
  374.  
  375. })
  376. })
  377. })
  378. message.guild.createChannel(`» DJ | الموسيقي .` , 'category').then(tb => {//Baron#1500
  379. message.guild.createChannel(`» Art.` , 'voice').then(ch => {
  380. ch.setParent(tb);
  381. ch.setUserLimit(15)
  382. })
  383. message.guild.createChannel(`» Fun.` , 'voice').then(ch => {
  384. ch.setParent(tb);
  385. ch.setUserLimit(15)
  386. })
  387. message.guild.createChannel(`» Life.` , 'voice').then(ch => {
  388. ch.setParent(tb);
  389. ch.setUserLimit(15)
  390. })
  391. message.guild.createChannel(`» Sing.` , 'voice').then(ch => {
  392. ch.setParent(tb);
  393. ch.setUserLimit(15)
  394. })
  395. })
  396. message.guild.createChannel(`» Privates | خآص .` , 'category').then(tb => {//Baron#1500
  397. message.guild.createChannel(`» Single.` , 'voice').then(ch => {
  398. ch.setParent(tb);
  399. ch.setUserLimit(1)
  400. })
  401. message.guild.createChannel('» Doubles.' , 'voice').then(ch => {
  402. ch.setParent(tb);
  403. ch.setUserLimit(2)
  404. })
  405. message.guild.createChannel('» Triples.' , 'voice').then(ch => {
  406. ch.setParent(tb);
  407. ch.setUserLimit(3)
  408. })
  409. message.guild.createChannel('» Forth.' , 'voice').then(ch => {
  410. ch.setParent(tb);
  411. ch.setUserLimit(4)
  412. })
  413. message.guild.createChannel('» Classic.' , 'voice').then(ch => {
  414. ch.setParent(tb);
  415. ch.setUserLimit(10)
  416. })
  417. message.guild.createChannel('» Group.' , 'voice').then(ch => {
  418. ch.setParent(tb);
  419. ch.setUserLimit(15)
  420. })
  421. }
  422. }
  423. }
  424. })
  425.  
  426. client.login(process.env.BOT_TOKEN)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement