/** * save comment of this user into comments table * @param [type] $_feedback [description] * @return [type] [description] */ private static function saveComment($_feedback) { $meta = ['url' => 'telegram']; if (bot::$user_id) { $meta['user'] = bot::$user_id; } $result = \lib\db\comments::save($_feedback, $meta); // send feedback to javad account after saving in comments table $text = "📨 بازخورد جدید از "; $text .= bot::response('from', 'first_name'); $text .= ' ' . bot::response('from', 'last_name'); $text .= "\n{$_feedback}\n"; $text .= "\nکد کاربر " . bot::response('from'); $text .= ' @' . bot::response('from', 'username'); $msg = ['method' => 'sendMessage', 'text' => $text, 'chat_id' => '46898544']; $result = bot::sendResponse($msg); return $result; }
/** * return userid * @return [type] [description] */ public static function userid() { $result['text'] = 'Your userid: ' . bot::response('from'); return $result; }