send message to a user #211
-
It is possible reply a message directly to an user, not into the group? tks |
Beta Was this translation helpful? Give feedback.
Replies: 3 comments 10 replies
-
Hey, the Anyway, you can use the So, probably this snippet is what you might be looking for: teleDart.onMessage().listen((message) {
teleDart.sendMessage(message.from?.id, "Your reply");
}); Once again, this will throw an error if the user hasn't chatted with the bot before. |
Beta Was this translation helpful? Give feedback.
-
Well well well, bad news. void main() async { teledart.onMessage(entityType: 'bot_command').listen((message) async { @DinoLeung any idea? tks |
Beta Was this translation helpful? Give feedback.
-
well i did a test directly in the web for me this makes no sense and limits some actions because I need to send private information to users. paulo |
Beta Was this translation helpful? Give feedback.
Hey, the
TeleDartMessage.reply
method is used to reply to the chat where the message is sent that is if the chat is a group chat, the bot will reply to the group itself.Anyway, you can use the
TeleDart.sendMessage
method to send messages to your bot users. Just pass the user's chat_id as a parameter to thesendMessage
method.So, probably this snippet is what you might be looking for:
Once again, this will throw an error if the user hasn't chatted with the bo…