Scriptorz5

Roblox clear chat notifications

Jun 24th, 2020
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. //handcrafted by wenlocktoad
  2.  
  3. function GrabConvos(resay) {
  4.     WenlockUrl = "https://chat.roblox.com/v2/get-user-conversations?pageNumber=1&pageSize=30"
  5.     $.ajax({
  6.         type: 'GET',
  7.         url: WenlockUrl,
  8.         async: false,
  9.         success: function(data) {
  10.             console.log(data)
  11.             for (var x in data) {
  12.                 console.log(data[x].id);
  13.                 GrabChats(data[x].id);
  14.             }
  15.  
  16.         }
  17.     });
  18.     console.log("fix a fix");
  19. }
  20.  
  21.  
  22.  
  23. function GrabChats(Hakai) {
  24.     IndraUrl = "https://chat.roblox.com/v2/get-messages?conversationId=" + Hakai + "&pageSize=30"
  25.     $.ajax({
  26.         type: 'GET',
  27.         url: IndraUrl,
  28.         async: false,
  29.         success: function(data) {
  30.             if (data.length != 0) {
  31.                 console.log(data[0].id)
  32.                 MarkRead(Hakai, data[0].id);
  33.             }
  34.  
  35.         }
  36.     });
  37. }
  38.  
  39.  
  40. function MarkRead(id, messageid) {
  41.     var beerus = {
  42.         "conversationId": id,
  43.         "endMessageId": messageid
  44.     }
  45.     RobotUrl = "https://chat.roblox.com/v2/mark-as-read"
  46.     $.ajax({
  47.         type: 'POST',
  48.         url: RobotUrl,
  49.         async: false,
  50.         contentType: "application/json; charset=utf-8",
  51.         data: JSON.stringify(beerus),
  52.         success: function(data) {
  53.             console.log(data);
  54.  
  55.         }
  56.     });
  57. }
  58.  
  59. GrabConvos();
Add Comment
Please, Sign In to add comment