Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to use SetGame #31

Closed
Krutonium opened this issue Feb 11, 2016 · 2 comments
Closed

Unable to use SetGame #31

Krutonium opened this issue Feb 11, 2016 · 2 comments

Comments

@Krutonium
Copy link

Imports Discord

Module Module1
    Dim Client As New DiscordClient
    Sub Main()

        Client.Connect("Username","Password")
        Client.SetGame("Anything")
        Console.ReadKey()
    End Sub
End Module

An unhandled exception of type 'System.NullReferenceException' occurred in Discord.Net.dll

Additional information: Object reference not set to an instance of an object.

Line 317 of DiscordClient.cs

@justas-d
Copy link
Contributor

Have you tried Await-ing the .Connect and .SetGame calls?

@Krutonium
Copy link
Author

Client.SetGame does not return a value, so Visual Studio will not let me await it. It doesn't matter anyway though - if I move Client.SetGame("Text") to my MessageRecieved Event Handler, it still doesn't work, even though at that point we are definitely connected.

quinchs added a commit to quinchs/Discord.Net that referenced this issue Sep 20, 2021
Docs: fixed docs for AlwaysAcknowledgeInteractions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants