Andrey0189

Untitled

Jun 8th, 2018
75
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. if(['s'].includes(command)) {
  2.         message.channel.send('First, you need to choose a language. Write rus/eng').then(() => {
  3.             const collector = new Discord.MessageCollector(message.channel, m => m.author.id === message.author.id, { time: 60000 });
  4.             collector.on('collect', msg => {
  5.                 collector.stop();
  6.                 let lang
  7.                 if (msg.content == 'rus') {
  8.                     lang = 'rus'
  9.                     message.channel.send('Теперь я буду говорить на русском');
  10.                 }
  11.                 else if (msg.content == 'eng') {
  12.                     message.channel.send('Now I`ll talk on english language');
  13.                     lang = 'eng'
  14.                 }
  15.                 else {
  16.                     message.channel.send('Sorry, but I don`t support this language');
  17.                 }
  18.                 collector.on('end', msg => {
  19.                     message.channel.send(lang);
  20.                     let prefixQuestion
  21.                     let noArgsInPerfix
  22.                     let myPrefix
  23.                     if (lang === 'rus') {
  24.                         prefixQuestion = 'Теперь, вам нужно выбрать префикс. Примеры префиксов: `!` `;` `=` `-` `)` `>`. Для префикса нежелательно использовать буквы или использовать более трех символов. Напишите `prefix: сам префикс` внизу. Обязательно через пробел!';
  25.                         noArgsInPerfix = 'Вы не указали префикс'
  26.                         myPrefix = 'Теперь мой новый префикс - `'
  27.                         message.channel.send(prefixQuestion + noArgsInPerfix + myPrefix);
  28.                     } else if (lang === 'eng') {
  29.                         prefixQuestion = 'Now you need to choose prefix. Examples of prefixs: `!` `;` `=` `-` `)` `>`. Dont use letters or more than 3 symbols. Writeм `prefix: prefix` under the message'
  30.                         noArgsInPerfix = 'You did not write a prefix'
  31.                         myPrefix = 'Now my new prefix is - `'
  32.                         message.channel.send(prefixQuestion + noArgsInPerfix + myPrefix);
  33.                     }
  34.                 })
  35.             }
  36.         )}
  37.     )}
Advertisement
Add Comment
Please, Sign In to add comment