Esempio n. 1
0
        /// <summary>
        /// Send the message
        /// </summary>
        /// <returns>An integer specifying the message id.long.MinValue indicates a failure</returns>
        public long sendMessage()
        {
            //lets restamp the users chat Presence (in case it took a long time on the queue)
            Roboto.Settings.markPresence(userID, chatID, userName);
            outboundMessageID = TelegramAPI.postExpectedReplyToPlayer(this);

            timeSentToUser = DateTime.Now;

            return(outboundMessageID);
        }
Esempio n. 2
0
 /// <summary>
 /// Check if a player has admin privs. Send a message to the group chat if the user isnt an admin.
 /// </summary>
 /// <param name="userID"></param>
 /// <returns></returns>
 public bool checkAdminPrivs(long userID, long sendFailMessageTo)
 {
     Roboto.log.log("Checking admin privs for " + userID + " in " + chatID);
     if (isChatAdmin(userID))
     {
         return(true);
     }
     else
     {
         //send fail message
         TelegramAPI.SendMessage(sendFailMessageTo, @"https://www.youtube.com/watch?v=YEwlW5sHQ4Q");
         return(false);
     }
 }