0

I am only going to share a bit of the code from this as I do not want to leak what I am currently making, if you require more please do tell, but for now I'll just have to put this.

private void Log(object sender, LogMessageEventArgs e)
    {
        Console.WriteLine(e.Message);
    }
    static void Main(string[] args)
    {
        DiscordClient discord;
        discord = new DiscordClient(x =>
        {
            x.LogLevel = LogSeverity.Info;
            x.LogHandler = Log; // Error CS0120
        });

I am trying to achieve logging any errors or anything that happens so I can make a discord bot, for the people who asked.

Anonymous
  • 7
  • 2

1 Answers1

2

CS0120 definition tells it all, refer the same here MSDN CS0120

Basically you are accessing a variable that is non-static (presumably "Log") in static "main" method.

Sumit
  • 136
  • 5