Add site setting to allow adding “content” to Discord messages
This can include ‘mentions’ such as `@everyone`
This commit is contained in:
parent
9d99f5659a
commit
1fa228b68c
|
@ -30,6 +30,7 @@ en:
|
||||||
########## DISCORD SETTINGS ###########
|
########## DISCORD SETTINGS ###########
|
||||||
#######################################
|
#######################################
|
||||||
chat_integration_discord_enabled: "Enable the Discord chat-integration provider"
|
chat_integration_discord_enabled: "Enable the Discord chat-integration provider"
|
||||||
|
chat_integration_discord_message_content: "The message to include above the summary when sending a notification to Discord"
|
||||||
chat_integration_discord_excerpt_length: "Discord post excerpt length"
|
chat_integration_discord_excerpt_length: "Discord post excerpt length"
|
||||||
|
|
||||||
#######################################
|
#######################################
|
||||||
|
|
|
@ -46,6 +46,8 @@ plugins:
|
||||||
#######################################
|
#######################################
|
||||||
chat_integration_discord_enabled:
|
chat_integration_discord_enabled:
|
||||||
default: false
|
default: false
|
||||||
|
chat_integration_discord_message_content:
|
||||||
|
default: ""
|
||||||
chat_integration_discord_excerpt_length:
|
chat_integration_discord_excerpt_length:
|
||||||
default: 400
|
default: 400
|
||||||
|
|
||||||
|
|
|
@ -36,6 +36,7 @@ module DiscourseChat
|
||||||
end
|
end
|
||||||
|
|
||||||
message = {
|
message = {
|
||||||
|
content: SiteSetting.chat_integration_discord_message_content,
|
||||||
embeds: [{
|
embeds: [{
|
||||||
title: post.topic.title,
|
title: post.topic.title,
|
||||||
description: post.excerpt(SiteSetting.chat_integration_discord_excerpt_length, text_entities: true, strip_links: true, remap_emoji: true),
|
description: post.excerpt(SiteSetting.chat_integration_discord_excerpt_length, text_entities: true, strip_links: true, remap_emoji: true),
|
||||||
|
|
Loading…
Reference in New Issue