Example #1
1
 private function main_menu()
 {
     $DbUser = new User($this->db);
     $group_chats = $DbUser->getActiveChatsByUser($this->Message->User);
     $Vote = new Vote($this->db);
     $popularity = $Vote->getVoteTotalForUser($this->Message->User);
     $ranking = Query::getGlobalRanking($this->db, $this->Message->User);
     $this->out = emoji(0x1f44b) . " Hi *" . $this->Message->User->getName() . "*!" . "\nI'm *" . BOT_FRIENDLY_NAME . "*, your _Premier Shitposting Solution_ " . emoji(0x2122) . "." . "\n\n" . emoji(0x1f481) . emoji(0x1f3fb) . "You're a " . $this->Message->User->getLevelAndTitle() . " with `" . $this->Message->User->getBalance() . "` Coin." . "\nOverall, your popularity is at *{$popularity}* points, and you're ranked *" . addOrdinalNumberSuffix($ranking) . "* on the global leaderboard.";
     $this->out .= "\n\n*This menu system is currently under development and may be incomplete/broken. You've been warned!*";
     if ($group_chats) {
         $this->out .= "\n\nI see you in the following group chats:";
         foreach ($group_chats as $chat) {
             $this->out .= "\n`   `• `" . $chat->title . "`";
         }
     }
     $this->out .= "\n\nWhat would you like?";
     $this->keyboard = [[['text' => emoji(0x2754) . ' Help', 'callback_data' => '/help help'], ['text' => emoji(0x1f4bc) . ' Business', 'callback_data' => '/help business']], [['text' => emoji(0x1f3ae) . ' Play a game', 'callback_data' => '/help games'], ['text' => emoji(0x2699) . ' Change preferences', 'callback_data' => '/preferences']]];
 }