forked from pokepark/PokemonRaidBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeys_trainerinfo.php
66 lines (63 loc) · 1.93 KB
/
keys_trainerinfo.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
<?php
/**
* Keys trainer info.
* @show bool
* @return array
*/
function keys_trainerinfo($show = false)
{
global $config;
// Toggle state.
$status = 'show';
if($show || !$config->TRAINER_BUTTONS_TOGGLE) {
// Always show buttons?
if(($show == true && !$config->TRAINER_BUTTONS_TOGGLE) || $config->TRAINER_BUTTONS_TOGGLE) {
$status = 'hide';
}
// Keys to set team and level
$keys = [
[
[
'text' => getPublicTranslation('trainerinfo'),
'callback_data' => 'trainer:vote_level:' . $status
],
],
[
[
'text' => getPublicTranslation('team') . SP . TEAM_B,
'callback_data' => 'trainer:vote_team:mystic'
],
[
'text' => getPublicTranslation('team') . SP . TEAM_R,
'callback_data' => 'trainer:vote_team:valor'
],
[
'text' => getPublicTranslation('team') . SP . TEAM_Y,
'callback_data' => 'trainer:vote_team:instinct'
],
],
[
[
'text' => getPublicTranslation('level') . ' +',
'callback_data' => 'trainer:vote_level:up'
],
[
'text' => getPublicTranslation('level') . ' -',
'callback_data' => 'trainer:vote_level:down'
]
]
];
} else {
// Key to show/hide trainer info.
$keys = [
[
[
'text' => getPublicTranslation('trainerinfo'),
'callback_data' => 'trainer:vote_level:' . $status
],
]
];
}
return $keys;
}
?>