Size: a a a

2017 May 07

K

Kostya in Dev Chat
Не, если такая ошибка, значит скоро опять слетит. Надо указать порт из окружения среды
источник

K

Kostya in Dev Chat
И хост
источник

VT

Viktar Tsikhanau in Dev Chat
20y
а в чем дело-то было? на всяк, если у кого будут траблы с этим
там трабла была что на хероку у меня был план  с web=1, worker=0. Так вот когда такая настройка то он постоянно требует веб порт какой-то, а в случае с worker то он нужен для такой типа "бэкграунд" работы что и подходит в случае с ботом. Переключаем на web=0, worker=1 и все ок. + нужен файл Procfile в корне папки - подронее уже можно погуглить и там уже все ясно
источник

2

20y in Dev Chat
Viktar Tsikhanau
там трабла была что на хероку у меня был план  с web=1, worker=0. Так вот когда такая настройка то он постоянно требует веб порт какой-то, а в случае с worker то он нужен для такой типа "бэкграунд" работы что и подходит в случае с ботом. Переключаем на web=0, worker=1 и все ок. + нужен файл Procfile в корне папки - подронее уже можно погуглить и там уже все ясно
благодарю)
источник
2017 May 08

ᅠᅠᅠᅠᅠᅠ ᅠᅠᅠᅠᅠ Abd in Dev Chat
Is there a way to change my name or username with TG-cli?
источник
2017 May 11

1

1C-Bitrix in Dev Chat
ᅠᅠᅠᅠᅠᅠ ᅠᅠᅠᅠᅠ Abd
Is there a way to change my name or username with TG-cli?
Hitler knows
источник
2017 May 14

G

Gesha in Dev Chat
Hi, i am trying to implement command which will create Menu in keyboard if command="/services" was entered
источник

G

Gesha in Dev Chat
but this menu shows for every command
источник

G

Gesha in Dev Chat
если что говорю по русски)
источник

1

1C-Bitrix in Dev Chat
а как читается твой ник? Гева?
источник

G

Gesha in Dev Chat
Геша
источник

1

1C-Bitrix in Dev Chat
покажи код, Геша
источник

G

Gesha in Dev Chat
ща
источник

G

Gesha in Dev Chat
'use strict';

const Telegram = require('telegram-node-bot');
const TelegramBaseController = Telegram.TelegramBaseController;
const TextCommand = Telegram.TextCommand;
const tg = new Telegram.Telegram('***', {
   webhook: {
       url: '***',
       port: 51456,
       host: 'localhost'
   }
});

class StartController extends TelegramBaseController {
   startHandler($) {
       $.sendMessage('Hi! I am telegram bot from ONYX Agency.' +
       ' Write appropriate commands in order to get information you need about us.');
   };

   get routes() {
       return {
           'startCommand': 'startHandler'
       };
   }
}

class AboutController extends TelegramBaseController {
   aboutHandler($) {
       $.sendMessage('We are Onyx Agency. A unique agency, combining all the types of ' +
       'digital services, such as web development, graphic design, photo- and ' +
       'videography and social media management, aimed at promoting and PR of your company. ' +
       'Additionally, we are young and creative people, full of incredible and ' +
       'interesting ideas for you and your projects.');
   }

   get routes() {
       return {
           'aboutCommand': 'aboutHandler'
       };
   }
}

class ServicesController extends TelegramBaseController {
   servicesHandler($) {
     $.runMenu({
       message: 'Select:',
       layout: [1, 1, 1, 1],
       'Web Development': () => {
           $.sendMessage('We create all kinds of websites, starting from the simplest, one-page ones, ' +
           'to sites with difficult system and many pages. If you want your website to be a unique trademark ' +
           'with distinctive features, then scroll the page till the end and write down our contacts.');
           $.sendPhoto({ url: 'http://onyxagency.az/images/portfolio/friends/img1.jpg', filename: 'Web-site for Friends Cinema & Game Center'});
       },
       'Graphic Design': () => {
           $.sendMessage('Logotypes, business cards, brochures, catalogues, brand books, posters and other elements ' +
           'of your unique corporate style - all of this will be prepared by our graphic designer according to the ' +
           'latest trends in the sphere and with consideration of your individual taste.');
           $.sendPhoto({ url: 'http://onyxagency.az/images/portfolio/noirlounge/img1.jpg', filename: 'Logotype for Noir Lounge'});
       },
       'Videography': () => {
           $.sendMessage('If you want a crew for a videoshooting, which besides a quality and fast work will also joy ' +
           'you with a unique scenario and provide you with lots of positive emotions at the set (just look at our backstage!), ' +
           'then ONYX Agency is exactly what you are looking for.');
           $.sendPhoto({ url: 'http://onyxagency.az/images/portfolio/beautesalon/img7.jpg', filename: 'Backstage photo from shooting Beaute Salon Promo Video'});
       },
       'Photography': () => {
           $.sendMessage('Our photographers will make a photomodel out of any person thanks to their professionalism ' +
           'and creative approach to their work. Moreover, we will help you by capturing the most touching and important ' +
           'moments of your life, making them the part of your history.');
           $.sendPhoto({ url: 'http://onyxagency.az/images/portfolio/festivalada/img1.jpg', filename: 'International Festival at ADA'});
       },
     });
   }

   get routes() {
       return {
           'servicesCommand': 'servicesHandler'
       };
   }
}

tg.router
   .when(new TextCommand('/start', 'startCommand'), new StartController())
   .when(new TextCommand('/about', 'aboutCommand'), new AboutController())
   .when(new TextCommand('/services', 'servicesCommand'), new ServicesController());
источник

G

Gesha in Dev Chat
не суди строго, на Node.js только сегодня начал программировать :D
источник

1

1C-Bitrix in Dev Chat
если я правильно понял, то тебе надо просто закрыть клавиатуру
источник

1

1C-Bitrix in Dev Chat
$.sendMessage("text", { reply_markup: JSON.stringify({ remove_keyboard: true }) } );
источник

1

1C-Bitrix in Dev Chat
источник

G

Gesha in Dev Chat
спасибо большое)
источник

1

1C-Bitrix in Dev Chat
да не за что
источник