File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -59,14 +59,20 @@ responder reload_slack => {
5959} => async sub ($self , $event , $what ) {
6060 $event -> mark_handled;
6161
62+ my $channel = $event -> from_channel;
63+
64+ unless ($channel -> can(' slack' )) {
65+ return await $event -> error_reply(" Sorry, you can't use *slackid* outside Slack" );
66+ }
67+
6268 if ($what eq ' users' ) {
63- $event -> from_channel -> slack-> load_users;
64- $event -> from_channel -> slack-> load_dm_channels;
69+ $channel -> slack-> load_users;
70+ $channel -> slack-> load_dm_channels;
6571 return $event -> reply(' Slack users reloaded' );
6672 }
6773
6874 if ($what eq ' channels' ) {
69- $event -> from_channel -> slack-> load_channels;
75+ $channel -> slack-> load_channels;
7076 return $event -> reply(' Slack channels reloaded' );
7177 }
7278
You can’t perform that action at this time.
0 commit comments