Exemplo n.º 1
0
        static public List <Message> sendBroadMessage(string text, bool disable_notification = false, parse_mode parse_mode = parse_mode.HTML)
        {
            List <Message> messagges = new List <Message>();

            TextCleaner(ref text);
            foreach (int chat_id in localUsersData.usersData.Keys)
            {
                string argument = string.Format("?chat_id={0}&text={1}&disable_notification={2}&parse_mode={3}", chat_id, text, disable_notification, parse_mode);
                messagges.Add(sendMessage(argument));
            }
            return(messagges);
        }
Exemplo n.º 2
0
        static public Message sendMessage(int chat_id, string text, bool disable_notification = false, int reply_to_message_id = -1, parse_mode parse_mode = parse_mode.HTML)
        {
            TextCleaner(ref text);
            string argument = string.Format("?chat_id={0}&text={1}&disable_notification={2}&parse_mode={3}", chat_id, text, disable_notification, parse_mode);

            if (reply_to_message_id != -1)
            {
                argument += "&reply_to_message_id=" + reply_to_message_id;
            }
            return(sendMessage(argument));
        }