Code Monkey home page Code Monkey logo

Comments (6)

hangyas avatar hangyas commented on September 25, 2024

That should be enough. What does your command do? I would guess you are calling send_message with a username, for group chats it has to be send_message msg.chat.id

from telegram_bot.

kiyui avatar kiyui commented on September 25, 2024

I'm fairly new to Crystal, so you'll have to guide me a bit because I'm not quite clear what you mean. My code is pretty similar to the example:

def initialize(@token)
    super("...", @token)

    cmd "example" do |msg, params|
        # process here
        reply msg, some_reply_string
    end
end

Replacing reply msg, some_reply_string with send_message msg.chat.id, some_reply_string does not seem to make a difference for me.

from telegram_bot.

hangyas avatar hangyas commented on September 25, 2024

Hm, both versions work for me. BotFather has /setjoingroups command, but I don't know how does that work though.

from telegram_bot.

kiyui avatar kiyui commented on September 25, 2024

Odd, I have /setjoingroups set to Enabled. The code for the testing bot I'm writing is available here if you want to see what I might be doing wrong.

from telegram_bot.

hangyas avatar hangyas commented on September 25, 2024

Ok, I had similar problem, removing and readding the bot fixed it. I have no idea what's going on but looks like the problem is on Telegrams side.

from telegram_bot.

kiyui avatar kiyui commented on September 25, 2024

Removing and re-adding does not seem to work for me. However, renaming the command seemed to have worked on one chat but not all. This seems related: https://stackoverflow.com/questions/40560576/telegram-bot-doesnt-work-on-certain-groups

Whatever the case, as this is a Telegram issue, I'll close the issue. Thanks for the help!

from telegram_bot.

Related Issues (11)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.