• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

PHP emoji函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了PHP中emoji函数的典型用法代码示例。如果您正苦于以下问题:PHP emoji函数的具体用法?PHP emoji怎么用?PHP emoji使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了emoji函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的PHP代码示例。

示例1: main

 public function main()
 {
     if ($this->Message->text == 'dubs') {
         $no = mt_rand(0, 9);
         Telegram::talk($this->Message->Chat->id, "`" . str_repeat($no, 9) . "`");
         return true;
     }
     $q = explode("d", trim($this->Message->text));
     if (count($q) == 2 && is_numeric($q[0]) && is_numeric($q[1])) {
         $no = intval($q[0]);
         $sides = intval($q[1]);
         if ($no < 0 || $sides < 0 || $no > 50 || $sides > 999999999) {
             Telegram::talk($this->Message->Chat->id, "naw brah");
             return false;
         }
         $out = array_map("mt_rand", array_fill(0, $no, 1), array_fill(0, $no, $sides));
         $out = implode(", ", $out);
         Telegram::talk($this->Message->Chat->id, "`" . $out . "`");
     } else {
         $out = mt_rand(0, 999999999);
         $dubs = array(9 => "nines", 8 => "eights", 7 => "sevens", 6 => "sixes", 5 => "quints", 4 => "quads", 3 => "trips", 2 => "dubs");
         foreach ($dubs as $key => $value) {
             $test = substr(strval($out), 0 - $key);
             if (preg_match('/^(.)\\1*$/', $test)) {
                 $text = str_repeat(emoji(0x1f389), $key - 1) . "`" . sprintf('%09d', $out) . "`" . "\nnice " . $value . " brah" . str_repeat("!", $key - 1);
                 Telegram::talk($this->Message->Chat->id, $text);
                 return true;
             }
         }
         Telegram::talk($this->Message->Chat->id, "`" . sprintf('%09d', $out) . "`");
     }
     return true;
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:33,代码来源:roll.php


示例2: main

 public function main()
 {
     $Vote = new Vote($this->db);
     $user_vote_total = $Vote->getVoteTotalForUserInChat($this->Message->User, $this->Message->Chat->id);
     $user_vote_from = $Vote->getUserVotesInChat($this->Message->User, $this->Message->Chat->id);
     $out = "You're on *{$user_vote_total}*. ";
     if (count($user_vote_from) > 0) {
         $out .= "You've voted as follows:";
         $thumbs_up = emoji(0x1f44d);
         $thumbs_down = emoji(0x1f44e) . emoji(0x1f3ff);
         foreach ($user_vote_from as $userVote) {
             $emoji = $userVote->vote == VoteType::Up ? $thumbs_up : $thumbs_down;
             $out .= "\n`   `• " . $emoji . " *" . ($userVote->voted_for ? $userVote->voted_for->getName() : 'uhoh') . "* ";
         }
     } else {
         $out .= "You haven't cast any votes.";
     }
     $out .= "\nYou can see the voting leaderboard with /vote";
     Telegram::talk($this->Message->Chat->id, $out);
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:20,代码来源:myvotes.php


示例3: main

 public function main()
 {
     if ($this->isParam() && $this->noParams() > 2) {
         $params = explode(' to ', $this->getAllParams(), 2);
         if (count($params) == 2) {
             try {
                 $date_due = Carbon::parse($params[0]);
                 $reminder = new Reminder();
                 $reminder->construct($this->Message->User->user_id, $this->Message->Chat->id, Carbon::now()->toDateTimeString(), $date_due->toDateTimeString(), $params[1]);
                 $ReminderControl = new Control($this->db);
                 $ReminderControl->addReminder($reminder);
                 $diff = $date_due->diffForHumans(Carbon::now(), true);
                 $out = emoji(0x23f2) . " Okay, I've scheduled a reminder in *{$diff}*.";
                 if ($date_due->diffInMinutes(Carbon::now()) < 60) {
                     $out .= "\n\nBy the way, I only send out notifications once a minute.";
                 }
                 Telegram::talk($this->Message->Chat->id, $out);
                 return true;
             } catch (\Exception $e) {
                 // nada
             }
         }
     }
     $out = emoji(0x270d) . " Like this fam: " . "\n" . "\n`   `• `/remind` *+2 hours* `to` *pick up the milk*" . "\n`   `• `/remind` *2:25PM 26th April* `to` *look out the window*" . "\n`   `• `/remind` *tomorrow 5PM* `to` *go outside*" . "\n`   `• `/remind` *monday 2AM* `to` *go to sleep*" . "\n" . "\nMy timezone is *GMT+8*, and it's now *" . date('g:i A') . "* on the *" . date('jS') . "*.";
     Telegram::talk($this->Message->Chat->id, $out);
     return true;
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:27,代码来源:remind.php


示例4: getTileEmoji

 public function getTileEmoji($reveal = false)
 {
     if ($reveal) {
         if ($this->mine) {
             return emoji(0x1f4a5);
         }
         if ($this->number == 0) {
             return emoji(0x2b1c);
         }
         return emoji(0x30 + $this->number) . emoji(0xfe0f) . emoji(0x20e3);
     }
     if ($this->revealed && $this->mine) {
         return emoji(0x1f4a5);
     }
     if ($this->revealed && $this->number == 0) {
         return emoji(0x2b1c);
     }
     if ($this->revealed) {
         return emoji(0x30 + $this->number) . emoji(0xfe0f) . emoji(0x20e3);
     }
     if ($this->flagged) {
         return emoji(0x1f6a9);
     }
     return emoji(0x2b1b);
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:25,代码来源:Tile.php


示例5: main

 public function main()
 {
     $Transact = new Transact($this->db);
     if ($this->noParams() == 2) {
         $user_receiving = Query::getUserMatchingStringOrErrorMessage($this->db, $this->Message->Chat, $this->getParam());
         if (is_string($user_receiving)) {
             Telegram::talk($this->Message->Chat->id, $user_receiving);
             return false;
         }
         $Transaction = new Transaction($this->Message->User, $user_receiving, $this->getParam(1), new TransactionType(TransactionType::Manual));
         $Transact->performTransaction($Transaction);
         if ($Feedback = $Transact->Feedback->getFeedback()) {
             $out = emoji("0x1F4E2") . " " . $Feedback . "\n`   `• `" . $user_receiving->getName() . "` now has 💰*" . $user_receiving->getBalance() . "*" . "\n`   `• `You've` got 💰*" . $this->Message->User->getBalance() . "* left.";
             if ($user_receiving->user_id != -1) {
                 $out .= "\n`   `• `The Bank` took 2%, or 💰*" . round($this->getParam(1) * 0.02, 2) . "*";
             }
             Telegram::talk($this->Message->Chat->id, $out);
         } else {
             Telegram::talk($this->Message->Chat->id, "I'm so sorry brah...");
         }
     } else {
         Telegram::talk($this->Message->Chat->id, "Like this fam " . emoji("0x1F449") . "  /send richardstallman 10");
     }
     return true;
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:25,代码来源:send.php


示例6: getRecentLogsText

 public function getRecentLogsText()
 {
     $logs = $this->SQL->RetrieveRecentLogs('5');
     $out = "";
     if (!empty($logs)) {
         $logs = array_slice($logs, 0, 4);
         foreach ($logs as $i) {
             $date = date('D jS g:iA', strtotime($i['date']));
             $out .= "\n`" . $date . "` \n` `" . emoji(0x27a1) . " *";
             if ($i->type == TransactionType::Manual) {
                 $out .= $i->user_sending . "* ";
             } elseif ($i->type == TransactionType::TransactionTax || $i->type == TransactionType::AllTax) {
                 $out .= COIN_TAXATION_BODY . "* collected ";
             } elseif ($i->type == TransactionType::RedistributionTax) {
                 $out .= COIN_REDISTRIBUTION_BODY . "* redistributed ";
             }
             if ($i->type == TransactionType::Manual) {
                 $out .= " (" . round($i->amount, 2) . " " . $i->user_receiving->user_name . " tax)";
             } elseif ($i->type == TransactionType::TransactionTax || $i->type == TransactionType::AllTax) {
                 $out .= round($i->amount, 2) . " in tax";
             } elseif ($i->type == TransactionType::RedistributionTax) {
                 $out .= round($i->amount, 2) . " of *" . COIN_TAXATION_BODY . "'s* wealth";
             } elseif (strcmp($i->user_receiving->user_name, COIN_TAXATION_BODY)) {
                 $out .= 'sent ' . round($i->amount, 2) . " to *" . $i->user_receiving->user_name . "*";
             } else {
                 $out .= 'donated ' . round($i->amount, 2) . " to *" . $i->user_receiving->user_name . "*";
             }
         }
     } else {
         $out .= "No recent transactions found.";
     }
     return $out;
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:33,代码来源:RecentLogs.php


示例7: main

 public function main()
 {
     $RussianRoulette = new RussianRoulette($this->db, $this->Message->Chat->id, $this->Message->User->user_id);
     $RussianRoulette->reload();
     $out = emoji(0x1f52b) . " `Revolver reloaded.`" . "\n" . "\nThere are *six* chambers, and *one* bullet." . "\nUse /trigger to play.";
     Telegram::talk($this->Message->Chat->id, $out);
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:7,代码来源:reload.php


示例8: display

 public function display()
 {
     if ($this->minesweeper->game->state == GameState::Lose) {
         $this->state = 'lose';
     }
     if ($this->minesweeper->game->state == GameState::Win) {
         $this->state = 'win';
     }
     if (strcmp($this->state, 'surrender') === 0) {
         $this->out = "You surrendered. Game over!";
         $this->keyboard = $this->minesweeper->getBoard(true);
         $this->keyboard[] = [['text' => emoji(0x21a9) . " Play again", 'callback_data' => "/minesweeper"]];
     } elseif (strcmp($this->state, 'lose') === 0) {
         $this->out = "Boom! Game over.";
         $this->keyboard = $this->minesweeper->getBoard(true);
         $this->keyboard[] = [['text' => emoji(0x21a9) . " Play again", 'callback_data' => "/minesweeper"]];
     } elseif (strcmp($this->state, 'win') === 0) {
         $this->out = "Victory! You uncovered all the non-mined tiles.";
         $this->keyboard = $this->minesweeper->getBoard(true);
         $this->keyboard[] = [['text' => emoji(0x21a9) . " Play again", 'callback_data' => "/minesweeper"]];
     } elseif (strcmp($this->state, 'reveal_mode') === 0) {
         $this->out = "Click mode: *uncover mine*";
         $this->keyboard = $this->minesweeper->getBoard();
         $this->keyboard[] = [['text' => emoji(0x1f6a9) . " Toggle Flags ON", 'callback_data' => "/minesweeper flag_mode"], ['text' => emoji(0x1f6aa) . " Surrender", 'callback_data' => "/minesweeper surrender"]];
     } else {
         $this->out = "Click mode: *place flag*";
         $this->keyboard = $this->minesweeper->getBoard();
         $this->keyboard[] = [['text' => emoji(0x1f6a9) . " Toggle Flags OFF", 'callback_data' => "/minesweeper reveal_mode"], ['text' => emoji(0x1f6aa) . " Surrender", 'callback_data' => "/minesweeper surrender"]];
     }
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:30,代码来源:minesweeper.php


示例9: emoji

 protected function emoji($text)
 {
     if (defined('STRICT_TYPES') && CAMEL_CASE == '1') {
         return (string) self::parameters(['text' => DT::STRING])->call(__FUNCTION__)->with($text)->returning(DT::STRING);
     } else {
         return (string) emoji($text);
     }
 }
开发者ID:tfont,项目名称:skyfire,代码行数:8,代码来源:strings.class.php


示例10: main

 public function main()
 {
     $Level = new Level();
     $user = $this->Message->User;
     $greetings = array("Arise", "Congratulations");
     if ($Level->buyLevel($user, $this->db)) {
         $out = emoji(0x1f4ef) . " " . $greetings[mt_rand(0, count($greetings) - 1)] . " *" . $user->getName() . "*, you are now a *Level " . $user->level . " " . $user->getTitle() . "*!" . "\nYou may rise to Level " . ($user->level + 1) . " for a price of " . $Level->getLevelPrice($user->level + 1) . " Coin.";
     } else {
         $out = emoji(0x1f44e) . " Sorry, you need " . $Level->getLevelPrice($user->level + 1) . " Coin to rise to Level " . ($user->level + 1) . ".";
     }
     Telegram::talk($this->Message->Chat->id, $out);
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:12,代码来源:buylevel.php


示例11: main

 public function main()
 {
     if ($this->Message->isCallback()) {
         if ($this->isParam() && strcmp($this->getParam(), 'button') === 0) {
             $this->out = emoji(0x1f38c) . " *WINNER!*\n\n*" . $this->Message->User->getName() . "* clicked the button!";
             Telegram::edit_inline_message($this->Message->Chat->id, $this->Message->message_id, $this->out, $this->keyboard);
         }
     } else {
         $this->out = emoji(0x1f3c1) . " *Click the button to win!!*";
         $this->generateKeyboard();
         Telegram::talk_inline_keyboard($this->Message->Chat->id, $this->out, $this->keyboard);
     }
     return true;
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:14,代码来源:click.php


示例12: main

 public function main()
 {
     if ($this->isParam()) {
         $user = Query::getUserMatchingStringOrErrorMessage($this->db, $this->Message->Chat, $this->getParam());
         if (is_string($user)) {
             Telegram::talk($this->Message->Chat->id, $user);
             return false;
         }
         Telegram::talk($this->Message->Chat->id, $user->getNameLevelAndTitle() . " has " . emoji("0x1F4B0") . "*" . $user->getBalance() . "*, brah");
     } else {
         Telegram::talk($this->Message->Chat->id, "You've got " . emoji("0x1F4B0") . "*" . $this->Message->User->getBalance() . "*, brah");
     }
     return true;
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:14,代码来源:check.php


示例13: main

 public function main()
 {
     $this->out = emoji(0x1f4a2) . " *A great rumbling fills the earth...* " . emoji(0x1f4a2) . "\n";
     if ($this->Message->User->getBalance() > 0 && $this->Message->User->level > 1) {
         $choices = ['loseFreeBets', 'losePopularity', 'loseAllMoney', 'dropOneLevel'];
     } elseif ($this->Message->User->getBalance() > 0 && $this->Message->User->level == 1) {
         $choices = ['loseFreeBets', 'losePopularity', 'loseAllMoney'];
     } elseif ($this->Message->User->getBalance() == 0 && $this->Message->User->level > 1) {
         $choices = ['loseFreeBets', 'losePopularity', 'dropOneLevel'];
     } else {
         $choices = ['loseFreeBets', 'losePopularity'];
     }
     $this->{$choices[mt_rand(0, count($choices) - 1)]}();
     Telegram::talk($this->Message->Chat->id, $this->out);
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:15,代码来源:apocalypse.php


示例14: t_roll

function t_roll($text, $chat_id)
{
    $out = mt_rand(0, 999999999);
    $dubs = array(9 => "nines", 8 => "eights", 7 => "sevens", 6 => "sixes", 5 => "quints", 4 => "quads", 3 => "trips", 2 => "dubs");
    foreach ($dubs as $key => $value) {
        $test = substr(strval($out), 0 - $key);
        if (preg_match('/^(.)\\1*$/', $test)) {
            $text = str_repeat(emoji(0x1f389), $key - 1) . sprintf('%09d', $out) . "\nnice " . $value . " brah" . str_repeat("!", $key - 1);
            talk($chat_id, $text);
            return true;
        }
    }
    talk($chat_id, sprintf('%09d', $out));
    return true;
}
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:15,代码来源:index-offline.php


示例15: sendReminders

 public function sendReminders()
 {
     $reminders = $this->SQL->select_reminders();
     $UserDb = new User($this->db);
     /** @var Reminder $reminder */
     foreach ($reminders as $reminder) {
         $date_due = Carbon::parse($reminder->date_due);
         $date_created = Carbon::parse($reminder->date_created);
         if ($date_due->lte(Carbon::now())) {
             $user = $UserDb->getUserFromId($reminder->user_id);
             $out = emoji(0x23f0) . " *" . $user->getName() . "*, your reminder from *" . $date_created->diffForHumans(Carbon::now(), true) . "* ago:" . "\n" . "\n`" . $reminder->content . "`";
             Telegram::talkForced($reminder->chat_id, $out);
             $this->SQL->delete_reminder($reminder);
         }
     }
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:16,代码来源:Control.php


示例16: main

 public function main()
 {
     $Level = new \GroupBot\Brains\Level\Level();
     if ($this->isParam()) {
         $user = Query::getUserMatchingStringOrErrorMessage($this->db, $this->Message->Chat, $this->getParam());
         if (is_string($user)) {
             $out = $user;
         } else {
             $out = emoji(0x1f4ef) . " Make way for " . $user->getNameLevelAndTitle() . "!";
         }
     } else {
         $user = $this->Message->User;
         $out = emoji(0x1f4ef) . " Greetings " . $user->getNameLevelAndTitle() . "." . "\nYou may rise to level " . ($user->level + 1) . " for a price of " . $Level->getLevelPrice($user->level + 1) . " Coin." . "\nPlease use /buylevel to do this.";
     }
     Telegram::talk($this->Message->Chat->id, $out);
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:16,代码来源:level.php


示例17: wx_success

/**
 * 微信指令 错误回复
 * @return string 
 */
function wx_success($contentStr, $is_json)
{
    $text_tpl = '<xml>
                 <ToUserName><![CDATA[%s]]></ToUserName>
                 <FromUserName><![CDATA[%s]]></FromUserName>
                 <CreateTime>%s</CreateTime>
                 <MsgType><![CDATA[text]]></MsgType>
                 <Content><![CDATA[%s]]></Content>
                 </xml>';
    $time = time();
    $contentStr = empty($is_json) ? $contentStr : json_encode($contentStr);
    $contentStr = "[得意]:成功咯!\n" . emoji($contentStr);
    $resultStr = sprintf($text_tpl, session('from'), session('to'), $time, $contentStr);
    echo $resultStr;
    die;
}
开发者ID:fedkey,项目名称:amango,代码行数:20,代码来源:function.php


示例18: main

 public function main()
 {
     return true;
     //Telegram::sendChatSendingPhotoStatus($this->Message->Chat->id);
     $Radar = new \GroupBot\Brains\Weather\Radar\Radar($this->Message->Chat->id, $this->db);
     $radar_code = 70;
     $image_radius_code = 3;
     if ($this->Message->isCallback()) {
         $key = $this->getParam();
         $radar_code = Radar_Codes::$radar_codes[$key][0];
         if (!$radar_code) {
             Telegram::edit_inline_message($this->Message->Chat->id, $this->Message->message_id, "Something went wrong!", []);
             return false;
         }
         Telegram::edit_inline_message($this->Message->Chat->id, $this->Message->message_id, "Showing {$radar_code}", []);
     } elseif ($this->isParam()) {
         if (!($radar_code = $Radar->getRadarCodeFromString($this->getParam()))) {
             Telegram::talk($this->Message->Chat->id, "Can't find that location, fam");
             return false;
         }
         if (is_array($radar_code)) {
             $keyboard = [];
             $row = [];
             foreach ($radar_code as $name) {
                 $row[] = ['text' => $name[0] . " (" . $name[2] . ")", 'callback_data' => "/radar {$name['2']}"];
             }
             $keyboard[] = $row;
             Telegram::talk_inline_keyboard($this->Message->Chat->id, "Did you mean one of these?", $keyboard);
             return false;
         }
         if ($this->noParams() > 1 && !($image_radius_code = $Radar->getImageRangeFromString($this->getParam(1)))) {
             Telegram::talk($this->Message->Chat->id, "can't find that range, fam\nusually there's `128km`, `256km` or `512km` available");
             return false;
         }
     }
     // Acquire lock
     $fp = fopen('/var/www/html/bot/radar/lock', 'r+');
     if (!flock($fp, LOCK_EX | LOCK_NB)) {
         Telegram::talk($this->Message->Chat->id, "cool it, m8\n" . emoji(0x1f914) . " i'm thinking");
         return false;
     }
     // Payload
     $Radar->createAndSendRadarGIF($radar_code, $image_radius_code);
     // Release lock
     fclose($fp);
     return true;
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:47,代码来源:radar.php


示例19: main

 public function main()
 {
     $RussianRoulette = new RussianRoulette($this->db, $this->Message->Chat->id, $this->Message->User->user_id);
     if ($RussianRoulette->isLoaded()) {
         if ($RussianRoulette->trigger()) {
             $out = emoji(0x1f4a5) . emoji(0x1f52b) . "\n" . "\n" . emoji(0x2620) . " *" . $this->Message->User->getName() . "* killed themselves." . "\n /reload to play again.";
             Telegram::talkForced($this->Message->Chat->id, $out);
             //Telegram::kick($this->Message->Chat->id, $this->Message->User->user_id);
         } else {
             $out = $this->getFace() . emoji(0x1f52b) . " `Click.`";
             Telegram::talk($this->Message->Chat->id, $out);
         }
     } else {
         $out = emoji(0x1f449) . " The revolver isn't loaded. Use /reload first.";
         Telegram::talk($this->Message->Chat->id, $out);
     }
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:17,代码来源:trigger.php


示例20: t_stats

 public function t_stats()
 {
     $log = new Logging($this->Message);
     $Coin = new Coin();
     $BlackjackSQL = new SQL();
     $CasinowarSQL = new \GroupBot\Brains\Casinowar\SQL();
     $Level = new Level();
     if ($this->isParam()) {
         $user_id = $log->checkIfUserIsLogged($this->getParam());
         if (!$user_id) {
             Telegram::talk($this->Message->Chat->id, "can't find that user, brah");
             return false;
         }
     } else {
         $user_id = $this->Message->User->id;
     }
     $log = $log->getAllUserLogsForChat($user_id);
     $bj_stats = $BlackjackSQL->select_player_stats($user_id);
     $cw_stats = $CasinowarSQL->select_player_stats($user_id);
     $level = $Level->SQL->get_level($user_id);
     $level_title = $Level->getTitle($level);
     $CoinUser = $Coin->SQL->GetUserById($user_id);
     $date = 0;
     foreach ($log->LogsCommand as $cmd) {
         if (strtotime($cmd->last_used) > $date) {
             $last_cmd = $cmd;
             $date = strtotime($cmd->last_used);
         }
     }
     if (!isset($last_cmd)) {
         return false;
     }
     $out = emoji(0x1f4c8) . "*" . $this->Message->Chat->title . "* stats for " . "\n*" . $log->User->first_name . " " . $log->User->last_name . "*, the Level *{$level}* {$level_title}" . "\n`   `•` " . $log->posts_today . "` message" . $this->plural_grammar($log->posts_today) . " sent today" . "\n`   `•` " . $log->posts . "` message" . $this->plural_grammar($log->posts) . " sent ever" . "\n`   `•` " . round(86400 * $log->posts / (strtotime("now") - strtotime("2015-11-19 11:00:00")), 0) . "` messages sent per day, on average" . "\nLast message `(" . date('D jS g:iA', strtotime($log->lastpost_date)) . ")`:" . "\n`   `_" . $log->lastpost . "_" . "\nLast command: `" . $last_cmd->command . "`" . "\n`   `•` " . $last_cmd->uses_today . "` use" . $this->plural_grammar($last_cmd->uses_today) . " today" . "\n`   `•` " . $last_cmd->uses . "` use" . $this->plural_grammar($last_cmd->uses_today) . " ever";
     $last_coin_activity = isset($CoinUser->last_activity) ? date('D jS g:iA', strtotime($CoinUser->last_activity)) : "not recorded";
     $out .= "\n\n" . emoji(0x1f4b2) . "*" . COIN_CURRENCY_NAME . "* stats:" . "\n`   `•` " . $CoinUser->getBalance() . "`" . emoji(0x1f4b0) . " in the bank" . "\n`   `•` " . $Coin->SQL->GetNumberOfTransactionsByUser($CoinUser) . "` outgoing transactions ever" . "\n`   `•`  `Last activity: `" . $last_coin_activity . "`";
     if ($bj_stats) {
         $bj_balance = $bj_stats->coin_won - $bj_stats->coin_lost;
         $out .= "\n\n" . emoji(0x1f0cf) . "*Blackjack* stats:" . "\n`   `•` " . $bj_stats->games_played . "` games ever with `" . $bj_stats->wins . ":" . $bj_stats->losses . ":" . $bj_stats->draws . "` _(W:L:D)_" . "\n`   `•` " . $bj_stats->hits . "` hits, `" . $bj_stats->stands . "` stands, `" . $bj_stats->surrenders . "` surrenders" . "\n`   `•` " . $bj_stats->splits . "` splits, `" . $bj_stats->doubledowns . "` doubledowns, `" . $bj_stats->blackjacks . "` blackjacks" . "\n`   `•` " . round($bj_stats->total_coin_bet, 2) . "`" . emoji(0x1f4b0) . " bet ever, currently " . ($bj_balance == 0 ? "breaking even at `" : ($bj_balance > 0 ? "up `" : "down `")) . round($bj_balance, 2) . "`" . emoji(0x1f4b0);
     }
     if ($cw_stats) {
         $cw_balance = $cw_stats->coin_won - $cw_stats->coin_lost;
         $out .= "\n\n" . emoji(0x1f0cf) . "*Casino war* stats:" . "\n`   `•` " . $cw_stats->games_played . "` games ever with `" . $cw_stats->wins . ":" . $cw_stats->losses . "` _(W:L)_" . "\n`   `•` " . $cw_stats->wars . "` wars and `" . $cw_stats->surrenders . "` surrenders." . "\n`   `•` " . round($cw_stats->total_coin_bet, 2) . "`" . emoji(0x1f4b0) . " bet ever, currently " . ($cw_balance == 0 ? "breaking even at `" : ($cw_balance > 0 ? "up `" : "down `")) . round($cw_balance, 2) . "`" . emoji(0x1f4b0);
     }
     Telegram::talk($this->Message->Chat->id, $out);
     return true;
 }
开发者ID:squaredcircle,项目名称:GroupBot,代码行数:46,代码来源:t_stats.php



注:本文中的emoji函数示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
PHP emoji_softbank_to_unified函数代码示例发布时间:2022-05-15
下一篇:
PHP emarking_validate_rubric函数代码示例发布时间:2022-05-15
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap