Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Step 1:
- dim statusOnline = 0
- dim statusOffline = 0
- dim statusIdle = 0
- dim statusDnd = 0
- Step 2 Private update users if discord clear users
- statusOnline = 0
- statusOffline = 0
- statusIdle = 0
- statusDnd = 0
- For Each
- step 3 for each
- Select Case user.Status.Value
- Case "online"
- statusOnline += 1
- Case "offline"
- statusOffline += 1
- Case "idle"
- statusIdle += 1
- Case "dnd"
- statusDnd += 1
- End Select
- Step 4
- Public Sub updateStatus(status As Integer(), server As String)
- statusOnline = status(0)
- statusOffline = status(1)
- statusIdle = status(2)
- statusDnd = status(3)
- editHTML("server", "
- <html>
- <head>
- <meta charset=""utf-8"">
- <meta name=""viewport"" content=""width=device-width, initial - Scale() = 1"">
- <link rel=""stylesheet"" href=""https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css"" type=""text/css"">
- <link rel=""stylesheet"" href=""users.css"" type=""text/css""> </head>
- <body color=white bgcolor=black style=""color: white;background-color: black;"">
- <div class=""py-5"">
- <div class=""container"">
- <div class=""row"">
- <div class=""col-md-12""><center>
- " & server & "<br>
- <img src=""./images/online.png"" width=10 height=10 />" & status(0) & "
- <img src=""./images/idle.png"" width=10 height=10 />" & status(2) & "
- <img src = ""./images/offline.png"" width=10 height=10 />" & status(1) & "
- <img src = ""./images/offline.png"" width=10 height=10 />" & status(3) & "
- </center>
- </div>
- </div>
- </div>
- </div>
- <script src=""https//code.jquery.com/jquery-3.1.1.min.js""></script>
- <script src=""https//cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js""></script>
- <script src=""https//pingendo.com/assets/bootstrap/bootstrap-4.0.0-alpha.6.min.js""></script>
- </body>
- </html>
- ", "")
- End Sub
- Step 5
- Select Case box
- Case "chat"
- Case "server"
- End Select
- Step 6
- Move code under chat
- Step 7 Move this under server
- If Not System.IO.File.Exists(Application.StartupPath & "\logs\server.html") Then
- System.IO.File.WriteAllText(Application.StartupPath & "\logs\server.html", msg)
- Else
- System.IO.File.WriteAllText(Application.StartupPath & "\logs\server.html", msg)
- End If
- wbServer.Navigate(Application.StartupPath & "\logs\server.html")
- Step 8 add webbrowser for wbServer
- Step 9 add code for server log
- If Not System.IO.File.Exists(Application.StartupPath & "\logs\server.html") Then
- System.IO.File.WriteAllText(Application.StartupPath & "\logs\server.html", "")
- End If
- Step 10 add code for status update
- updateStatus({statusOnline, statusIdle, statusOffline, statusDnd}, ComboBox2.Text)
- step 11 add user update listener
- Public Sub onPlayerUpdate(send As Object, e As Discord.UserUpdatedEventArgs) Handles discord.UserUpdated
- doit = True
- End Sub
- step 12 add code to activate player update under timer that wont stop
- add dim doit = false in global
- If doit Then
- doit = False
- updateUsers()
- End If
- step 13 remove any other updateusers that are found outside the listener
- step 14 add the status images
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement