LoginSignup
0
0

More than 1 year has passed since last update.

slack_sdkのバージョン3.8.0等でicon_emojiを利用する場合

Last updated at Posted at 2021-07-28

slack_sdkのバージョンアップによりWebhookClientのsendメソッドでicon_emoji等が設定できなくなっていましたので、以下の方法に変更

    webhook = WebhookClient("https://hooks.slack.com/services/......")
    response = webhook.send_dict(
        body={
            'username':'UserName',
            'icon_emoji':':fire:',
            'text':'テストメッセージ'
        }
    )

ライブラリのバージョンアップでまた変更されるかもですが、sendではなく、send_dictに変更することで解決しました。

2021/07/28時点の情報です

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0