This repository has been archived by the owner on Jul 12, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 5
/
Copy pathslack
executable file
·91 lines (85 loc) · 2.89 KB
/
slack
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
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
#!/usr/bin/env php
<?php
/*
* This file is part of the slack-cli package.
*
* (c) Cas Leentfaar <[email protected]>
*
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*/
use CL\SlackCli\Command;
use CL\SlackCli\Console\Application;
if (version_compare(phpversion(), '5.4', '<')) {
fwrite(STDERR, "PHP needs to be a minimum version of PHP 5.4\n");
exit(1);
}
// installed via composer?
if (file_exists($a = __DIR__.'/../../autoload.php')) {
require_once $a;
} else {
require_once __DIR__.'/vendor/autoload.php';
}
$commands = [
new Command\ApiTestCommand(),
new Command\AuthTestCommand(),
new Command\ChannelsArchiveCommand(),
new Command\ChannelsCreateCommand(),
new Command\ChannelsHistoryCommand(),
new Command\ChannelsInfoCommand(),
new Command\ChannelsInviteCommand(),
new Command\ChannelsJoinCommand(),
new Command\ChannelsKickCommand(),
new Command\ChannelsLeaveCommand(),
new Command\ChannelsListCommand(),
new Command\ChannelsMarkCommand(),
new Command\ChannelsRenameCommand(),
new Command\ChannelsSetPurposeCommand(),
new Command\ChannelsSetTopicCommand(),
new Command\ChannelsUnarchiveCommand(),
new Command\ChatDeleteCommand(),
new Command\ChatPostMessageCommand(),
new Command\ChatUpdateCommand(),
new Command\ConfigEditCommand(),
new Command\ConfigGetCommand(),
new Command\ConfigListCommand(),
new Command\ConfigSetCommand(),
new Command\ConfigUnsetCommand(),
new Command\EmojiListCommand(),
new Command\FilesInfoCommand(),
new Command\FilesListCommand(),
new Command\FilesUploadCommand(),
new Command\GroupsArchiveCommand(),
new Command\GroupsCloseCommand(),
new Command\GroupsCreateChildCommand(),
new Command\GroupsCreateCommand(),
new Command\GroupsHistoryCommand(),
new Command\GroupsInviteCommand(),
new Command\GroupsKickCommand(),
new Command\GroupsLeaveCommand(),
new Command\GroupsListCommand(),
new Command\GroupsMarkCommand(),
new Command\GroupsOpenCommand(),
new Command\GroupsRenameCommand(),
new Command\GroupsSetPurposeCommand(),
new Command\GroupsSetTopicCommand(),
new Command\GroupsUnarchiveCommand(),
new Command\ImCloseCommand(),
new Command\ImHistoryCommand(),
new Command\ImListCommand(),
new Command\ImMarkCommand(),
new Command\ImOpenCommand(),
new Command\OauthAccessCommand(),
new Command\SearchAllCommand(),
new Command\SearchFilesCommand(),
new Command\SearchMessagesCommand(),
new Command\SelfUpdateCommand(),
new Command\StarsListCommand(),
new Command\UsersInfoCommand(),
new Command\UsersListCommand(),
new Command\UsersSetActiveCommand(),
new Command\UsersSetPresenceCommand(),
];
$application = new Application();
$application->addCommands($commands);
$application->run();