Last active
August 29, 2015 14:03
-
-
Save Mr-Byte/dd14ba106a609d50ee93 to your computer and use it in GitHub Desktop.
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
Imports AW | |
Module Bot | |
' Variable to hold a reference to the bot instance. | |
Dim _instance As Instance | |
' Variable to hold a reference to avatar add handler. | |
Dim _avatarAddHandler As InstanceEventHandler | |
Sub Main() | |
_instance = New Instance() | |
' This is how you get the address of an event handler. | |
_avatarAddHandler = AddressOf AvatarAdd | |
' Register the handler with the Bot instance | |
AddHandler _instance.EventAvatarAdd, avatarAddHandler | |
' Unregister the handler with the Bot instance | |
RemoveHandler _instance.EventAvatarAdd, avatarAddHandler | |
End Sub | |
Sub AvatarAdd(sender As Instance) | |
' Intentionally left blank for example purposes. | |
End Sub | |
End Module |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment