diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-10-16 22:11:54 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-10-16 22:14:25 +0200 |
commit | 1af420ecdb537966577e6d6f27d8ff00a42b096e (patch) | |
tree | fe215bd8196fe593b34979958e9510435796b9e3 /wee_slack.py | |
parent | d3da855bb57f9cf795cab8626dd7f9b089232212 (diff) | |
download | wee-slack-1af420ecdb537966577e6d6f27d8ff00a42b096e.tar.gz |
Add a command to list the Slack teams
This can be used when you want to remove a team, so you know which token
to remove.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index 05e304d..65cfff8 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3864,6 +3864,19 @@ def print_users_info(team, header, users): @slack_buffer_required @utf8_decode +def command_teams(data, current_buffer, args): + """ + /slack teams + List the connected Slack teams. + """ + team = EVENTROUTER.weechat_controller.buffers[current_buffer].team + teams = EVENTROUTER.teams.values() + extra_info_function = lambda team: "token: {}...".format(team.token[:15]) + return print_team_items_info(team, "Slack teams", teams, extra_info_function) + + +@slack_buffer_required +@utf8_decode def command_channels(data, current_buffer, args): """ /slack channels |