๐Ÿ“ฆ mataku / fastlane-plugin-discord_webhook

A lightweight fastlane Plugin to send a message using Discord Webhook.

โ˜… 1 stars โ‘‚ 0 forks ๐Ÿ‘ 1 watching โš–๏ธ MIT License
discordfastlanefastlane-plugin
๐Ÿ“ฅ Clone https://github.com/mataku/fastlane-plugin-discord_webhook.git
HTTPS git clone https://github.com/mataku/fastlane-plugin-discord_webhook.git
SSH git clone git@github.com:mataku/fastlane-plugin-discord_webhook.git
CLI gh repo clone mataku/fastlane-plugin-discord_webhook
Takuma Homma Takuma Homma Rescue only JSON related error 6131218 1 years ago ๐Ÿ“ History
๐Ÿ“‚ develop View all commits โ†’
๐Ÿ“ .github
๐Ÿ“ fastlane
๐Ÿ“ lib
๐Ÿ“ misc
๐Ÿ“ spec
๐Ÿ“„ .gitignore
๐Ÿ“„ .rspec
๐Ÿ“„ CHANGELOG.md
๐Ÿ“„ Gemfile
๐Ÿ“„ LICENSE
๐Ÿ“„ Rakefile
๐Ÿ“„ README.md
๐Ÿ“„ README.md

discord_webhook plugin

fastlane Plugin Badge

Getting Started

This project is a fastlane plugin. To get started with fastlane-plugin-discord_webhook, add it to your project by running:

fastlane add_plugin discord_webhook

You must create a webhook before using library. See details: https://support.discord.com/hc/en-us/articles/228383668-Intro-to-Webhooks.

About discord_webhook

A lightweight fastlane plugin to send a message using Discord Webhook

Parameters

KeyDescription
webhook_urlDiscord Webhook URL.
username[Optional] Username. It will override webhook's username if specified.
messageThe message you want to send.
attachment_file_path[Optional] File path to upload. See details for supported types: https://discord.com/developers/docs/reference#uploading-files
embed_payload[Optional] Embed Object. You can specify one object. See details: https://discord.com/developers/docs/resources/message#embed-object

Example

# Send a simple message
lane :discord_message do
  discord_webhook(
    webhook_url: 'https://yourDiscordWebhookUrl',
    message: 'hello',
    # You can override username by specifying it if needed.
    # username: 'mataku'
  )
end

# Send a message with a file
lane :discord_message_with_file do
  discord_webhook(
    webhook_url: 'https://yourDiscordWebhookUrl',
    message: 'hello',
    attachment_file_path: '/home/mataku/screenshot.png',
    # Be careful to use relative path.
    # Fastfile is into fastlane/, but fastlane tries to load from working directory.
  )
end

# Send a message with embed content
lane :discord_message_with_embed do
  discord_webhook(
    webhook_url: 'https://yourDiscordWebhookUrl',
    message: 'hello',
    embed_payload: {
      title: 'embed_title',
      description: 'embed_description',
      url: 'https://github.com/mataku',
      thumbnail: {
        url: 'https://github.com/mataku.png'
      }
    }
  )
end

Mention

You can mention by using User ID or Role ID, not display name.

lane :user_mention do
  discord_webhook(
    # ...
    # Specify User ID, like <@USER_ID>
    message: 'Hi, <@12340987651234567>'
  )
end

lane :role_mention do
  discord_webhook(
    # ...
    # Specify Role ID with &, like <@&ROLE_ID>
    message: 'Hi, <@&123456798765123456>'
  )
end

User ID reference | Role ID reference :--: | :--: |

  • - -
See details: https://support.discord.com/hc/en-us/articles/206346498-Where-can-I-find-my-User-Server-Message-ID#h_01HRSTXPS5H5D7JBY2QKKPVKNA.

Issues and Feedback

For any other issues and feedback about this plugin, please submit it to this repository.

Troubleshooting

If you have trouble using plugins, check out the Plugins Troubleshooting guide.