<?php
function logs($token, $choice = null) {
$this->valid_token($token);
global $logs;
if ($choice == null) {
return '[[ send "1. \\n2. \\n3. ::logs" ]]';
} else {
$choice--;
if (isset($logs[$choice])) {
$log = logs[$choice];
return '[[ send "${$log}::logs::1000" ]]';
} else {
throw new Error('Invalid choice');
}
}
}
<?php
function logs($token, $choice = 0) {
$this->valid_token($token);
global $logs;
if (isset($logs[$choice])) {
$log = logs[$choice];
return '[[ send "${$log}::logs::1000" ]]';
} else {
throw new Error('Invalid choice');
}
}
<?php
function logs($token, $choice = 0) {
$this->valid_token($token);
global $logs;
if (isset($logs[$choice])) {
$log = $logs[$choice];
if ($choice == 0) {
return '[[ send "${$log}::logs" ]]';
} else {
return '[[ send "${$log}::logs::1000" ]]';
}
} else {
throw new Error('Invalid choice');
}
}
$logs
array