Last active
November 19, 2023 08:24
-
-
Save Julli4n/2d89291cc1cf44e523241c2d7d24d62c to your computer and use it in GitHub Desktop.
Roblox auto decline call
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const userIdsThatCanCall = []; | |
const client = Roblox.RealTime.Factory.GetClient(); | |
client.Subscribe("CallNotification", callDetail => { | |
if (callDetail.Type === "NewCall" && | |
(callDetail.CallerId !== Roblox.CurrentUser.userId && !userIdsThatCanCall.includes(callDetail.CallerId)) | |
) { | |
CoreUtilities.httpService.post({ | |
url: "https://apis.roblox.com/call/v1/decline-call", | |
withCredentials: true | |
}, { callId: callDetail.CallId }); | |
} | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Where do i put this code?