| @@ 184-191 (lines=8) @@ | ||
| 181 | /** |
|
| 182 | * {@inheritDoc} |
|
| 183 | */ |
|
| 184 | public function getChannels() |
|
| 185 | { |
|
| 186 | if (!$this->connected) { |
|
| 187 | return Promise\reject(new ConnectionException('Client not connected. Did you forget to call `connect()`?')); |
|
| 188 | } |
|
| 189 | ||
| 190 | return Promise\resolve(array_values($this->channels)); |
|
| 191 | } |
|
| 192 | ||
| 193 | /** |
|
| 194 | * {@inheritDoc} |
|
| @@ 212-219 (lines=8) @@ | ||
| 209 | /** |
|
| 210 | * {@inheritDoc} |
|
| 211 | */ |
|
| 212 | public function getGroups() |
|
| 213 | { |
|
| 214 | if (!$this->connected) { |
|
| 215 | return Promise\reject(new ConnectionException('Client not connected. Did you forget to call `connect()`?')); |
|
| 216 | } |
|
| 217 | ||
| 218 | return Promise\resolve(array_values($this->groups)); |
|
| 219 | } |
|
| 220 | ||
| 221 | /** |
|
| 222 | * {@inheritDoc} |
|
| @@ 240-247 (lines=8) @@ | ||
| 237 | /** |
|
| 238 | * {@inheritDoc} |
|
| 239 | */ |
|
| 240 | public function getDMs() |
|
| 241 | { |
|
| 242 | if (!$this->connected) { |
|
| 243 | return Promise\reject(new ConnectionException('Client not connected. Did you forget to call `connect()`?')); |
|
| 244 | } |
|
| 245 | ||
| 246 | return Promise\resolve(array_values($this->dms)); |
|
| 247 | } |
|
| 248 | ||
| 249 | /** |
|
| 250 | * {@inheritDoc} |
|
| @@ 268-275 (lines=8) @@ | ||
| 265 | /** |
|
| 266 | * {@inheritDoc} |
|
| 267 | */ |
|
| 268 | public function getUsers() |
|
| 269 | { |
|
| 270 | if (!$this->connected) { |
|
| 271 | return Promise\reject(new ConnectionException('Client not connected. Did you forget to call `connect()`?')); |
|
| 272 | } |
|
| 273 | ||
| 274 | return Promise\resolve(array_values($this->users)); |
|
| 275 | } |
|
| 276 | ||
| 277 | /** |
|
| 278 | * {@inheritDoc} |
|