diff --git a/src/content/docs/guides/attachments.mdx b/src/content/docs/guides/attachments.mdx index 2280d7b..af7dd76 100644 --- a/src/content/docs/guides/attachments.mdx +++ b/src/content/docs/guides/attachments.mdx @@ -86,6 +86,12 @@ luau supports sending these attachments through the `AttachmentBuilder` object. ``` +:::caution + Remember to enable the message content intent on the [Discord Developer Portal](https://discord.com/developers) when the `DiscordClient.eventManager.onMessage` event is used. + + If the intent is not enabled, the bot won't have access to the message content! +::: + That's all! For more details, refer to the relevant docs; - [DiscordAttachment](/classes/objects/discordattachment/) diff --git a/src/content/docs/guides/embeds.mdx b/src/content/docs/guides/embeds.mdx index 328e5e8..f18b50b 100644 --- a/src/content/docs/guides/embeds.mdx +++ b/src/content/docs/guides/embeds.mdx @@ -35,7 +35,13 @@ within a message. DiscordClient:connectAsync() ``` -2. Create a Discord embed that we can respond with: +2. Allow the bot to check messages: + + - Go to the [Discord Developer Portal](https://discord.com/developers/applications) + - Choose your bot application in the `Applications` tab + - Go to the `Bot` tab and enable `MESSAGE CONTENT INTENT` + +3. Create a Discord embed that we can respond with: ```lua local responseEmbed = DiscordLuau.EmbedBuilder.new() @@ -47,7 +53,7 @@ within a message. :setFooter("This is a footer") ``` -3. Reply to the message with the newly created embed: +4. Reply to the message with the newly created embed: ```lua local responseMessage = DiscordLuau.MessageBuilder.new() @@ -59,7 +65,7 @@ within a message. :addField("Field 2", "Value 2", true) :setFooter("This is a footer") - message:replyAsync(responseMessage:setEmbed(responseEmbed)) + message:replyAsync(responseMessage:addEmbed(responseEmbed)) ``` @@ -83,7 +89,7 @@ within a message. :addField("Field 2", "Value 2", true) :setFooter("This is a footer") - message:replyAsync(responseMessage:setEmbed(responseEmbed)) + message:replyAsync(responseMessage:addEmbed(responseEmbed)) end end)