Bugsounet_Coding();

    • Register
    • Login
    • Search

    Solved command will show the id

    EXT-TelegramBot
    2
    14
    172
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • M
      myayo last edited by

      I have install TelegramBot

      but when I try this command /mychatid, he said “Unrecognized command. Say what?”

      what should I do ?

      Thanks

      1 Reply Last reply Reply Quote 0
      • bugsounet
        bugsounet Main Coder last edited by

        Hi, just make a private chat with YOUR bot, not with botFather 😉

        1 Reply Last reply Reply Quote -1
        • M
          myayo last edited by

          you speak french?

          i have try also in my bot. and i have no answer.
          can i send an image?

          1 Reply Last reply Reply Quote 0
          • bugsounet
            bugsounet Main Coder last edited by

            in all case, you have to talk with your bot not to BotFather

            Do you set the Configuration (Pre-use) in your config ?

            {
              module: 'MMM-TelegramBot',
              position: 'top_center',
              config: {
                telegramAPIKey : '<your Telegram API Token>',
                allowedUser : ['<your Telegram username without @>'], // This is NOT the username of bot.
              }
            },
            
            M 1 Reply Last reply Reply Quote 0
            • M
              myayo last edited by

              yes, i have this code in my config.and no answer

              1 Reply Last reply Reply Quote 0
              • M
                myayo @bugsounet last edited by

                @bugsounet said in command will show the id:

                in all case, you have to talk with your bot not to BotFather

                Do you set the Configuration (Pre-use) in your config ?

                {
                  module: 'MMM-TelegramBot',
                  position: 'top_center',
                  config: {
                    telegramAPIKey : '<your Telegram API Token>',
                    allowedUser : ['<your Telegram username without @>'], // This is NOT the username of bot.
                  }
                },
                
                1 Reply Last reply Reply Quote 0
                • M
                  myayo last edited by

                  yes i have this code in my config.
                  but i don’t have answer.in my bot
                  Can I send you my picture in your Telegram?

                  1 Reply Last reply Reply Quote 0
                  • bugsounet
                    bugsounet Main Coder last edited by

                    sure, but it will not correct the problem

                    start MM past ALL log since MM start ?

                    1. if pm2 manger started, stop it with pm2 stop 0
                    2. run MagicMirror manually
                    cd ~/MagicMirror
                    npm start
                    

                    copy all logs, past it there

                    1 Reply Last reply Reply Quote 0
                    • M
                      myayo last edited by

                      voila my log

                      [19.10.2021 12:39.32.729] [LOG] Starting MagicMirror: v2.16.0
                      [19.10.2021 12:39.32.738] [LOG] Loading config …
                      [19.10.2021 12:39.32.753] [LOG] Loading module helpers …
                      [19.10.2021 12:39.32.757] [LOG] No helper found for module: alert.
                      [19.10.2021 12:39.33.232] [LOG] Initializing new module helper …
                      [19.10.2021 12:39.33.235] [LOG] Module helper loaded: updatenotification
                      [19.10.2021 12:39.33.237] [LOG] No helper found for module: clock.
                      [19.10.2021 12:39.34.882] [LOG] Initializing new module helper …
                      [19.10.2021 12:39.34.884] [LOG] Module helper loaded: MMM-CalendarExt2
                      [19.10.2021 12:39.37.179] [LOG] Initializing new module helper …
                      [19.10.2021 12:39.37.181] [LOG] Module helper loaded: MMM-TelegramBot
                      [19.10.2021 12:39.37.182] [LOG] All module helpers loaded.
                      [19.10.2021 12:39.37.475] [LOG] Starting server on port 8080 …
                      [19.10.2021 12:39.37.505] [LOG] Server started …
                      [19.10.2021 12:39.37.507] [LOG] Connecting socket for: updatenotification
                      [19.10.2021 12:39.37.510] [LOG] Connecting socket for: MMM-CalendarExt2
                      [19.10.2021 12:39.37.511] [LOG] Connecting socket for: MMM-TelegramBot
                      [19.10.2021 12:39.37.513] [LOG] Sockets connected & modules started …
                      [19.10.2021 12:39.38.022] [LOG] Launching application.
                      [19.10.2021 12:39.38.372] [ERROR] (node:1449) electron: The default of contextIsolation is deprecated and will be changing from false to true in a future release of Electron. See https://github.com/electron/electron/issues/23506 for more information
                      [19.10.2021 12:39.47.586] [LOG] [TELBOT] MMM-TelegramBot Version: 1.3.8
                      [19.10.2021 12:39.47.659] [LOG] [TELBOT] Ready!
                      [19.10.2021 12:39.47.771] [INFO] Checking git for module: MMM-CalendarExt2
                      [19.10.2021 12:39.47.777] [LOG] [CALEXT2] calendar:Flavio >> Scanning start with interval:1800000
                      [19.10.2021 12:39.47.790] [LOG] [CALEXT2] calendar:Holiday >> Scanning start with interval:1800000
                      [19.10.2021 12:39.48.011] [INFO] Checking git for module: MMM-TelegramBot
                      [19.10.2021 12:39.48.202] [LOG] [CALEXT2] calendar:Holiday >> Scanned: 12, Selected: 12
                      [19.10.2021 12:39.49.126] [LOG] [CALEXT2] calendar:Flavio >> Scanned: 72, Selected: 72

                      1 Reply Last reply Reply Quote 0
                      • M
                        myayo last edited by

                        [19.10.2021 14:04.19.700] [LOG] [TELBOT] ERROR {
                        ok: false,
                        error_code: 400,
                        description: ‘Bad Request: chat_id is empty’
                        }
                        [19.10.2021 14:04.19.784] [LOG] [TELBOT] ERROR {
                        ok: false,
                        error_code: 400,
                        description: ‘Bad Request: chat_id is empty’
                        }
                        [19.10.2021 14:04.19.860] [LOG] [TELBOT] ERROR {
                        ok: false,
                        error_code: 400,
                        description: ‘Bad Request: chat_id is empty’
                        }
                        [19.10.2021 14:04.19.940] [LOG] [TELBOT] ERROR {
                        ok: false,
                        error_code: 400,
                        description: ‘Bad Request: chat_id is empty’
                        }

                        1 Reply Last reply Reply Quote 0
                        • bugsounet
                          bugsounet Main Coder last edited by

                          I think your initial config is not really set

                          We will verify that:

                          Talk to BotFather

                          enter this command:

                          /mybots
                          

                          You will see your list of bot and Click to your needed bot

                          Now click on API Token

                          BotFather will display your telegramAPIKey, copy this value and past it into your conf
                          like this:

                          {
                            module: 'MMM-TelegramBot',
                            position: 'top_center',
                            config: {
                              telegramAPIKey : "9214428XX:AAHylo_ZiBlFykyWKOYoC3J2kAAAAABZZZZ",
                              allowedUser : ["<your Telegram username without @>"],
                            }
                          },
                          

                          allowedUser Filed

                          Warning: It’s not your Nickname ! it’s your username
                          You can discover it in parameter => profile
                          You username is with an @ sample mine is @bugsounet
                          so in your config just report your username WITHOUT @
                          sample for me :

                           allowedUser : ["bugsounet"],
                          

                          save your config and lanch magicmirror

                          Where is my bot !?

                          BotFather send you a link in blue with @<your bot name>
                          Just click on it !

                          send /mychatid with private message to your bot

                          TelegramBot will respond

                          /mychatid
                          
                          Votre chatId est 70272XXX.
                          

                          just past your chatid in the config:

                          {
                            module: 'MMM-TelegramBot',
                            position: 'top_center',
                            config: {
                              telegramAPIKey : "9214428XX:AAHylo_ZiBlFykyWKOYoC3J2kAAAAABZZZZ",
                              allowedUser : ["bugsounet"],
                              adminChatId : 70272XXX,
                            }
                          },
                          

                          Note: All values is some sample, just replace by yours 🙂

                          1 Reply Last reply Reply Quote 0
                          • M
                            myayo last edited by

                            Thanks for your help, now it’s ok. my APIkey was not good.

                            Where can I find a list to use telegrambot whith ma magicmirror.
                            Can I hide one module?

                            1 Reply Last reply Reply Quote 0
                            • M
                              myayo last edited by

                              I have to find to hide ans show module.

                              1 Reply Last reply Reply Quote 0
                              • bugsounet
                                bugsounet Main Coder last edited by

                                Hi, It’s actually coded with another module (GA) but maybe in TelegramBot directly is better, i will see if i can move it

                                Note: It’s to complex actually to do it with custom command

                                To show all commands (wiki says) try /commands

                                1 Reply Last reply Reply Quote 0
                                • undefined  bugsounet bugsounet 
                                • Moved from by  bugsounet bugsounet 
                                • First post
                                  Last post
                                Powered by NodeBB | @bugsounet ©2023