diff options
author | blackst0ne <blackst0ne.ru@gmail.com> | 2018-11-05 03:24:26 +0300 |
---|---|---|
committer | blackst0ne <blackst0ne.ru@gmail.com> | 2018-11-05 03:24:26 +0300 |
commit | 736b6f1d12e26292a3d2c40bad8334753823ab1e (patch) | |
tree | c8d3f2f7a0df79f3d3c9632f0948d8bebeb9329f /app/models/project_services | |
parent | 1ec470fd3893aa50d1db6a9e77164a379e60d63a (diff) |
Update discord notification service
Diffstat (limited to 'app/models/project_services')
-rw-r--r-- | app/models/project_services/discord_service.rb | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/app/models/project_services/discord_service.rb b/app/models/project_services/discord_service.rb index ffd82afc131..3718af3a6e6 100644 --- a/app/models/project_services/discord_service.rb +++ b/app/models/project_services/discord_service.rb @@ -19,7 +19,7 @@ class DiscordService < ChatNotificationService "This service sends notifications about projects events to Discord channels.<br /> To set up this service: <ol> - <li><a href='ADD-DISCORD-LINK-HERE'>Setup a custom Incoming Webhook</a>.</li> + <li><a href='https://support.discordapp.com/hc/en-us/articles/228383668-Intro-to-Webhooks'>Setup a custom Incoming Webhook</a>.</li> <li>Paste the <strong>Webhook URL</strong> into the field below.</li> <li>Select events below to enable notifications.</li> </ol>" @@ -30,9 +30,11 @@ class DiscordService < ChatNotificationService end def event_field(event) + # No-op. end def default_channel_placeholder + # No-op. end def default_fields @@ -47,13 +49,9 @@ class DiscordService < ChatNotificationService def notify(message, opts) client = Discordrb::Webhooks::Client.new(url: webhook) + client.execute do |builder| builder.content = message.pretext - # builder.add_embed do |embed| - # embed.title = 'Embed title' - # embed.description = 'Embed description' - # embed.timestamp = Time.now - # end end end |