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

Add a Discord logging System in Roblox

  • This website was created by Roblox members to replace the official forums (because Roblox shut them down) Join us if you like Roblox!

Should I make a Thread on Roblox Studio for Feedback Discord bots too?


  • Total voters
    13
Status
Not open for further replies.

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 = "delete 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)

You put this Script in the Workspace and in discord you will get a bot telling you who joined. it can be usefull for feedbacks too :P
 

YakovTag7772

Member
Reputation: 0 / 0 / 0
Dec 12, 2017
52
11
8
Roblox
YakovTag7772
Discord
Yakov#7772
Proof:
 
  • Like
Reactions: Zay and owalio

TechRabbit

New Member
Reputation: 0 / 0 / 0
Jan 26, 2018
1
1
1
I can make a shorter version:
Lua:
local http = game:GetService("HttpService")
local Data = {
    ["content"] = "Hey! This is a message sent from roblox!"
}

Data = http:JSONEncode(Data)

http:PostAsync("WEBHOOK GOES HERE", Data)
 
  • Like
Reactions: 1 person

YakovTag7772

Member
Reputation: 0 / 0 / 0
Dec 12, 2017
52
11
8
Roblox
YakovTag7772
Discord
Yakov#7772
I can make a shorter version:
Lua:
local http = game:GetService("HttpService")
local Data = {
    ["content"] = "Hey! This is a message sent from roblox!"
}

Data = http:JSONEncode(Data)

http:PostAsync("WEBHOOK GOES HERE", Data)
thx for ur msg ur right
 
  • Like
Reactions: 1 person

YakovTag7772

Member
Reputation: 0 / 0 / 0
Dec 12, 2017
52
11
8
Roblox
YakovTag7772
Discord
Yakov#7772
Things like this are pretty useful for logging what staff members do ;)
True I haven't thought about that, I use it for feedback and if someone joins my game I join too Because I get a Desktop Notification ;)
 
  • Like
Reactions: 1 person

Afterlight

Active Member
Reputation: 0 / 0 / 0
Feb 17, 2018
287
38
28
Roblox
Afterl1ght
Is that true? Why?
I've been searching why and I've found out that Discord blocked Roblox HTTP Requests through Webhook due to the majority of sent data were violating the Discord ToS, which leads to the disconnection between Roblox and Discord. Rip
 
  • Like
Reactions: 1 person
Status
Not open for further replies.