I’m making a module that sends request to my Discord Bot - which sends it to a channel. However, I’m not sure how to filter it.
This module will also be used for direct (roblox → discord webhook) request too.
I’m making a module that sends request to my Discord Bot - which sends it to a channel. However, I’m not sure how to filter it.
This module will also be used for direct (roblox → discord webhook) request too.
This tutorial should be what you need.
Thank you so much!!!
#30charrr
Actually - this is receiving a request from the client, I need it solely on the server, not the client. Should I just use my own user id then?
Here you go.
This still asks for a userid of the player it’s receiving information from. Would I put my UserID in that spot, since the information isn’t fetched from anyone?
If I remember correctly, you can just add your own userid. I will have to check, give me a few minutes as I have this implemented somewhere!
Alright. Thanks.
#30charrsssssss
Yes you can use your own userid, here’s an example
local PlayerUserId = Player['UserId']
local FilterSuccess, FilterResult = pcall(function()
return TextService:FilterStringAsync(
Reason,
PlayerUserId
)
end)
if (FilterSuccess)
(sorry for the spaces, copied it straight from studio.)
then you can use this to set the text / string:
Reason = FilterResult:GetNonChatStringForUserAsync(PlayerUserId) or ''
Alright, I appreciate you.
I’ll be making good use of this.
Thanks!
You are welcome! I’m sure this still works, it’s not an old script