Skip to content

Instantly share code, notes, and snippets.

@Julli4n
Last active November 19, 2023 08:24
Show Gist options
  • Save Julli4n/2d89291cc1cf44e523241c2d7d24d62c to your computer and use it in GitHub Desktop.
Save Julli4n/2d89291cc1cf44e523241c2d7d24d62c to your computer and use it in GitHub Desktop.
Roblox auto decline call
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 });
}
})
@Gubban331
Copy link

Where do i put this code?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment