Aug 17, 2014 05:30 PM
(This post was last modified: Aug 17, 2014 05:31 PM by shooterbret.)
I have made a bot for Skype in vb.net but every 15 minutes or so after use it stops responding.This is the code:
I think this is the handler because I set the label to change to the text each time a message is sent.
I have also tried this:
but it makes it glitch so it sends 2 messages at a time.
After I tried all of this I made a log to see what was causing it and it wasn't anything specific and it was anything to a simple command, to someone just sending me a message. Does anybody have a clue what is causing my bot to do this. Any help will be appreciated.
Code
Private Sub K9Bot_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim Skype = New Skype
Skype.Attach(7, False)
AddHandler Skype.MessageStatus, AddressOf skype_MessageStatus
'AddHandler Skype.MessageStatus, AddressOf whoknows
End Sub
Public Sub skype_MessageStatus(ByVal msg As SKYPE4COMLib.ChatMessage, ByVal status As TChatMessageStatus)
'MsgBox("regulator")
Try
If status = TChatMessageStatus.cmsReceived Or status = TChatMessageStatus.cmsSent Then
Label4.Text = msg.Body.ToString
If msg.Body.StartsWith("!") Then
Botstring = msg.ChatName.ToString
form1.ListBox12.Items.Add(msg.Body.ToString)
Label2.Text = msg.Body.ToString
If msg.Body.Equals("!help") Or msg.Body.Equals("!menu") Then
msg.Chat.SendMessage(form1.TextBox17.Text.ToString)I think this is the handler because I set the label to change to the text each time a message is sent.
I have also tried this:
Code
ElseIf status = TChatMessageStatus.cmsRead Or status = TChatMessageStatus.cmsSending ThenAfter I tried all of this I made a log to see what was causing it and it wasn't anything specific and it was anything to a simple command, to someone just sending me a message. Does anybody have a clue what is causing my bot to do this. Any help will be appreciated.



