Webhook questions

I’m making a webhook to send a message to a Discord server whenever a certain player joins a game. I was wondering two things, how do I make new lines, and how do I @ a certain role?

May you please provide your code, or use the Scripting Support Template?

Here’s my code.

-- Player joins
game.Players.PlayerAdded:Connect(function(player)
	if player:GetRankInGroup(GROUP) >= 15 then
		local data = {
			['embeds'] = {{
				['title'] = "A HICOM member has joined the game!",
				['description'] = "Name: "..player.Name.."\nRank: "..player:GetRoleInGroup(GROUP).."\nGame link:\n"..LINK.."\nPing:\n@"
				
			}}
		}
	end
end)

Edit:
It’s not finished yet, I just want to know how to @ roles and make sure I am creating new lines correctly.

-- Player joins
game.Players.PlayerAdded:Connect(function(player)
	if player:GetRankInGroup(GROUP) >= 15 then
		local data = {
			['embeds'] = {{
				['title'] = "A HICOM member has joined the game!",
				description = {
					{name = "Name:", value = player.Name, inline = true},
					{name = "Rank:", value = "player:GetRoleInGroup(GROUP)", inline = true},
					{name = "Game Link:", value = LINK},
					{name = "Ping:", value = "@" .. player.Name}
    				  }
				
			}}
		}
	end
end)

This should work, if you are using the BloxLink bot which changes their nicknames to their Roblox username.

This is not tested though.

Thanks so much! I’ll try it out. :smiley:

Webhooks can’t ping certain roles, the only thing webhooks can ping is @everyone.