Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- if(['s'].includes(command)) {
- message.channel.send('First, you need to choose a language. Write rus/eng').then(() => {
- const collector = new Discord.MessageCollector(message.channel, m => m.author.id === message.author.id, { time: 60000 });
- collector.on('collect', msg => {
- collector.stop();
- let lang
- if (msg.content == 'rus') {
- lang = 'rus'
- message.channel.send('Теперь я буду говорить на русском');
- }
- else if (msg.content == 'eng') {
- message.channel.send('Now I`ll talk on english language');
- lang = 'eng'
- }
- else {
- message.channel.send('Sorry, but I don`t support this language');
- }
- collector.on('end', msg => {
- message.channel.send(lang);
- let prefixQuestion
- let noArgsInPerfix
- let myPrefix
- if (lang === 'rus') {
- prefixQuestion = 'Теперь, вам нужно выбрать префикс. Примеры префиксов: `!` `;` `=` `-` `)` `>`. Для префикса нежелательно использовать буквы или использовать более трех символов. Напишите `prefix: сам префикс` внизу. Обязательно через пробел!';
- noArgsInPerfix = 'Вы не указали префикс'
- myPrefix = 'Теперь мой новый префикс - `'
- message.channel.send(prefixQuestion + noArgsInPerfix + myPrefix);
- } else if (lang === 'eng') {
- prefixQuestion = 'Now you need to choose prefix. Examples of prefixs: `!` `;` `=` `-` `)` `>`. Dont use letters or more than 3 symbols. Writeм `prefix: prefix` under the message'
- noArgsInPerfix = 'You did not write a prefix'
- myPrefix = 'Now my new prefix is - `'
- message.channel.send(prefixQuestion + noArgsInPerfix + myPrefix);
- }
- })
- }
- )}
- )}
Advertisement
Add Comment
Please, Sign In to add comment