OnClientReady Function no matching overload
The OnClientReady function is not working with Client.Ready and is coming up with an error stating:
Error CS0123 No overload for 'OnClientReady' matches delegate 'AsyncEventHandler<DiscordClient, ReadyEventArgs>' MrBastard 18 Active
my code for the "Bot.cs" file:
namespace MrBastard { public class Bot { public DSharpPlus.DiscordClient Client { get; private set; }
public async Task RunAsync()
{
var config = new DSharpPlus.DiscordConfiguration
{
};
Client = new DSharpPlus.DiscordClient(config);
Client.Ready += OnClientReady; <-- line 18
}
private Task OnClientReady(DSharpPlus.EventArgs.ReadyEventArgs e)
{
return null;
}
}
}
Don't know why it is doing this or how to fix it. Help would be appreciated.
Hello! In private Tusk OnClientReady you must add 1 argument DiscordClient client, example:
OnClientReady(DiscordClient client, ReadyEventArgs e)
hello, i've tried this solution but I'm still getting the same problem