public static async Task Client_UnknownEvent(DiscordClient sender, UnknownEventArgs e) { var msg = "Unknown Event Triggered: " + e.EventName; sender.Logger.LogWarning(msg); await LogChannel.SendLogMessageAsync("Unknow Event", msg, LogLevel.Warning); }
private async Task OnUnknownEvent(UnknownEventArgs e) { if (UnknownEvent != null) { await UnknownEvent(e); } }
public void MethodUnknownGenericClass() { //IL_00b1: Unknown result type (might be due to invalid IL or missing references) //IL_00bc: Expected O, but got Unknown //IL_00be: Unknown result type (might be due to invalid IL or missing references) //IL_00c3: Unknown result type (might be due to invalid IL or missing references) //IL_00cd: Expected O, but got Unknown //IL_00cd: Expected O, but got Unknown //IL_00d0: Unknown result type (might be due to invalid IL or missing references) //IL_00d5: Unknown result type (might be due to invalid IL or missing references) //IL_00e1: Expected O, but got Unknown //IL_00e1: Expected O, but got Unknown UnknownGenericClass <UnknownEventArgs> val = new UnknownGenericClass <UnknownEventArgs>(); UnknownEventArgs unknownProperty = val.UnknownProperty; val.UnknownProperty = unknownProperty; List <object> list = new List <object> { val[((object)unknownProperty).GetHashCode()] ?? "", val.NotProperty, val.get_NotPropertyWithGeneric <string>(42), val[42], val.get_NotPropertyWithParameterAndGeneric <object>(int.MinValue), val.get_PropertyCalledGet }; val.OnEvent += Instance_OnEvent; val.OnEvent -= Instance_OnEvent; UnknownEventArgs val2 = val[(UnknownEventArgs)null]; val[new UnknownEventArgs()] = val2; UnknownEventArgs val3 = val[new UnknownEventArgs(), new UnknownEventArgs()]; val[new UnknownEventArgs(), new UnknownEventArgs()] = val3; }
private async Task OnUnknownEvent(UnknownEventArgs e) { var file = $"{Guid.NewGuid()}_{e.EventName}.json"; var message = $"An unknown event happened: {e.EventName}{Environment.NewLine}" + $"It was saved with the name {file}"; await Services.GetRequiredService <Logger>() .LogAsync(new LogMessage(LogLevel.Critical, $"Winson {e.Client.ShardId}", message)); File.AppendAllText(file, e.Json); }
private void Instance_OnEvent(object sender, UnknownEventArgs e) { throw new NotImplementedException(); }
private Task UnknownEvent(UnknownEventArgs e) { /* This would kill my bot */ return(Task.CompletedTask); }
private Task Client_UnknownEvent(UnknownEventArgs e) { e.Client.DebugLogger.LogMessage(LogLevel.Info, "BotApp", e.ToString(), DateTime.Now); return(Task.CompletedTask); }
public static Task UnknownEventHandlerAsync(TheGodfatherBot shard, UnknownEventArgs e) { Log.Error("Unknown event ({UnknownEvent}) occured: {@UnknownEventJson}", e.EventName, e.Json); return(Task.CompletedTask); }
public static async Task UnknownEvent(DiscordClient c, UnknownEventArgs a) { await logger.InfoAsync("Unknown Event: " + a.EventName).ConfigureAwait(false); }
private Task Event_UnknownEvent(DiscordClient d, UnknownEventArgs e) { d.Logger.LogDebug(BotEventId, "Event_UnknownEvent."); return(Task.CompletedTask); }