Skip to content

OnClientReady Function no matching overload #5

@Hyndy

Description

@Hyndy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions