forked from pokepark/PokemonRaidBot
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathkeys_event.php
34 lines (33 loc) · 909 Bytes
/
keys_event.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
<?php
/**
* Event keys.
* @param $gym_id_plus_letter
* @param $action
* @return array
*/
function keys_event($gym_id_plus_letter, $action) {
$q = my_query("
SELECT id,
name
FROM events
WHERE id != 999
");
while($event = $q->fetch()) {
if(!empty($event['name'])) {
$keys[] = array(
'text' => $event['name'],
'callback_data' => $gym_id_plus_letter . ':' . $action . ':' . $event['id']
);
}else {
info_log('Invalid event name on event '. $event['id']);
}
}
$keys[] = array(
'text' => getTranslation("Xstars"),
'callback_data' => $gym_id_plus_letter . ':' . $action . ':X'
);
// Get the inline key array.
$keys = inline_key_array($keys, 1);
return $keys;
}
?>