Skip to content
This repository has been archived by the owner on Jul 5, 2022. It is now read-only.

Commit

Permalink
Give alias to commands for future remove of dzunke namespace
Browse files Browse the repository at this point in the history
  • Loading branch information
DZunke committed Oct 28, 2015
1 parent 4b2ebab commit db0247c
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ SlackBundle v1.3.0
- Feature: Implement action and service to get details about users on the team
- Feature: Implement console command to read userdata from api
- Patch: File upload no longer need to lookup channel id due to api changes
- Patch: Set aliases for command names - old names with dzunke: prefix will be removed in the future!

SlackBundle v1.2.2
==================
Expand Down
1 change: 1 addition & 0 deletions Command/BotMessagingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ protected function configure()
{
$this
->setName('dzunke:slack:run-bot')
->setAliases(['slack:run-bot'])
->setDescription('Running the Bot-User to a Channel')
->addArgument(
'channel',
Expand Down
1 change: 1 addition & 0 deletions Command/ChangeChannelsTopicCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ protected function configure()
{
$this
->setName('dzunke:slack:channels:topic')
->setAliases(['slack:channels:topic'])
->setDescription('Changing the Topic of a Channel')
->addOption('discover', 'd', InputOption::VALUE_NONE, 'channel name is given, so discover the id')
->addArgument('channel', InputArgument::REQUIRED, 'an existing channel in your team to change the topic')
Expand Down
1 change: 1 addition & 0 deletions Command/DebugCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ protected function configure()
{
$this
->setName('dzunke:slack:debug')
->setAliases(['slack:debug'])
->setDescription('Gives some Debug Informations about the SlackBundle');
}

Expand Down
1 change: 1 addition & 0 deletions Command/MessageCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ protected function configure()
{
$this
->setName('dzunke:slack:message')
->setAliases(['slack:message'])
->setDescription('Sending a Message to a Channel or User')
->addArgument('channel', InputArgument::REQUIRED, 'an existing channel in your team to send to')
->addArgument('username', InputArgument::REQUIRED, 'an username from configured identities to send with')
Expand Down
1 change: 1 addition & 0 deletions Command/UsersCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ protected function configure()
{
$this
->setName('dzunke:slack:users')
->setAliases(['slack:users'])
->setDescription('work with the users of your team')
->addOption('only-active', 'a', InputOption::VALUE_NONE, 'lists only active users')
->addOption('only-deleted', 'd', InputOption::VALUE_NONE, 'lists only deleted users')
Expand Down
16 changes: 8 additions & 8 deletions Resources/doc/commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,27 @@
Output of Debug Informations like Connection, Identities, Channels etc.

``` bash
php app/console dzunke:slack:debug
php app/console slack:debug
```

## Messaging

Sending a Message directly from Console

``` bash
php app/console dzunke:slack:message @fooUser BazUser "Lorem ipsum dolor sit amet .."
php app/console dzunke:slack:message "#FooChannel" BazUser "Lorem ipsum dolor sit amet .."
php app/console slack:message @fooUser BazUser "Lorem ipsum dolor sit amet .."
php app/console slack:message "#FooChannel" BazUser "Lorem ipsum dolor sit amet .."
```

## Switch Topic of a Channel

You can switch the Topic of a Channel

``` bash
php app/console dzunke:slack:channels:topic "C02GABTDT" "Lorem ipsum dolor sit amet .."
php app/console slack:channels:topic "C02GABTDT" "Lorem ipsum dolor sit amet .."

# If you don't have the ChannelId it must be discovered while processing
php app/console dzunke:slack:channels:topic "#foo-channel" "Lorem ipsum dolor sit amet .." -d
php app/console slack:channels:topic "#foo-channel" "Lorem ipsum dolor sit amet .." -d
```

## Read userdata from api
Expand All @@ -34,8 +34,8 @@ you will get a table of userdata.

``` bash
# Read all users from your team
php app/console dzunke:slack:users
php app/console slack:users

# Read a single user
php app/console dzunke:slack:users --user=nameOfTheUser
```
php app/console slack:users --user=nameOfTheUser
```

0 comments on commit db0247c

Please sign in to comment.