here is the code i've made:
local webhook = 'webhook here' local HS = game:GetService('HttpService') game.ReplicatedStorage.RemoteEvent.OnServerEvent:Connect(function(player) local randomskinnum = math.random(math.random(1,5), math.random(5,10)) print(randomskinnum) local message = { ['content'] = player.Name.. ' got a number of '.. randomskinnum } local msg = HS:JSONEncode(message) HS:PostAsync(webhook, msg) end)
For now, it can only send messages in a channel but I want to know how I can make it send a direct message to a certain user.
You send the Roblox user Name or user id over the Webhook.
Everything else is handled by the Discord Bot script and not for subject in this forum. You basically need Discord users to verify themselves with their roblox account and create a database to link discord id to roblox player name or player id.