Welcome to the Forums!
Join thousands of other Roblox members with a free account.
Create Forum Account

Discord Join Logger Thingy *script*

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!
Status
Not open for further replies.

IMiniBrewer99

New Member
Reputation: 0 / 0 / 0
Dec 12, 2017
4
1
3
local HTTP = game:GetService("HttpService")
local Key = "(delet this and put your webhook key, the long link on the webhook details in discord)"
local HookData = {
['content'] = "";
}

game.Players.PlayerAdded:connect(function(player)
HookData.content = ("**" .. player.Name .. "**" .. " has joined the server!")
HTTP:PostAsync(Key, HTTP:JSONEncode(HookData))
end)

game.Players.PlayerRemoving:connect(function(player)
HookData.content = ("**" .. player.Name .. "**" .. " has left the server!")
HTTP:PostAsync(Key, HTTP:JSONEncode(HookData))
end)
 
  • Like
Reactions: Jeruhmi

YakovTag7772

Member
Reputation: 0 / 0 / 0
Dec 12, 2017
52
11
8
Roblox
YakovTag7772
Discord
Yakov#7772
local HTTP = game:GetService("HttpService")
local Key = "(delet this and put your webhook key, the long link on the webhook details in discord)"
local HookData = {
['content'] = "";
}

game.Players.PlayerAdded:connect(function(player)
HookData.content = ("**" .. player.Name .. "**" .. " has joined the server!")
HTTP:postAsync(Key, HTTP:JSONEncode(HookData))
end)

game.Players.PlayerRemoving:connect(function(player)
HookData.content = ("**" .. player.Name .. "**" .. " has left the server!")
HTTP:postAsync(Key, HTTP:JSONEncode(HookData))
end)
THX!
 

FighterRBX

VIP
Reputation: 1 / 0 / 0
Dec 12, 2017
651
2
45
28
19
frustration
Roblox
Fighter169mobile
Discord
Fighter169mobile#2189
Note: That emoji is there because of the : P becoming :P

Lua:
HTTP:PostAsync()
 

FighterRBX

VIP
Reputation: 1 / 0 / 0
Dec 12, 2017
651
2
45
28
19
frustration
Roblox
Fighter169mobile
Discord
Fighter169mobile#2189
How this works

Lua:
-- variables
local HTTP = game:GetService("HttpService")
local Key = " **insert webhook key here** "
local HookData = {
['content'] = "null";
}

HookData.content = "**This will be sent to a Discord webhook." -- changes "null" to this text.
HTTP:PostAsync(Key, HTTP:JSONEncode(HookData))
end)

-- I don't know anything about Discord webhooks :/ ..but this is what happens on the roblox side.
 

YakovTag7772

Member
Reputation: 0 / 0 / 0
Dec 12, 2017
52
11
8
Roblox
YakovTag7772
Discord
Yakov#7772
Lua:
local HTTP = game:GetService("HttpService")
local Key = "(delet this and put your webhook key, the long link on the webhook details in discord)"
local HookData = {
['content'] = "";
}

game.Players.PlayerAdded:connect(function(player)
HookData.content = ("**" .. player.Name .. "**" .. " has joined the server!")
HTTP:postAsync(Key, HTTP:JSONEncode(HookData))
end)

game.Players.PlayerRemoving:connect(function(player)
HookData.content = ("**" .. player.Name .. "**" .. " has left the server!")
HTTP:postAsync(Key, HTTP:JSONEncode(HookData))
end)
 

Breanna

Well-known Member
Reputation: 0 / 0 / 0
Feb 11, 2018
2,709
215
63
From CandyLand.
Roblox
Lightbulb_u
local HTTP = game:GetService("HttpService")
local Key = "(delet this and put your webhook key, the long link on the webhook details in discord)"
local HookData = {
['content'] = "";
}

game.Players.PlayerAdded:connect(function(player)
HookData.content = ("**" .. player.Name .. "**" .. " has joined the server!")
HTTP:PostAsync(Key, HTTP:JSONEncode(HookData))
end)

game.Players.PlayerRemoving:connect(function(player)
HookData.content = ("**" .. player.Name .. "**" .. " has left the server!")
HTTP:PostAsync(Key, HTTP:JSONEncode(HookData))
end)
Is this before scripting?
 
Status
Not open for further replies.