kj415j45/kjBot

View on GitHub
module/credit/transfer.php

Summary

Maintainability
A
0 mins
Test Coverage
<?php

global $Event, $Queue;
loadModule('credit.tools');
use kjBot\SDK\CQCode;

$QQ = nextArg();
if(!(preg_match('/\d+/', $QQ, $match) && $match[0] == $QQ)){
    $QQ = parseQQ($QQ);
}
$transfer = abs((int)nextArg());
transferCredit($Event['user_id'], $QQ, $transfer);

$Queue[]= sendBack('转账给 '.CQCode::At($QQ).' 成功,您的余额为 '.getCredit($Event['user_id']));
?>