Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions DiscordLab.Administration/Patches/ErrorLog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ public static void Postfix(object message)

MemoryStream stream = new MemoryStream();
StreamWriter writer = new StreamWriter(stream);
writer.Write(message.ToString());
writer.Write(message?.ToString() ?? "Null error message");
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When will the error ever be null? People shouldn't be sending errors with no content.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sometimes there is null errors idk why but it happened to me you get spammed every couple seconds with warnings and null errors thats why I fixed it

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You must have a weird plugin then that does that, because it seems literally impossible to get the error

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I mean it happened to me, it wont harm to add the check considring the huge amount of wired plugins that exists lol

writer.Flush();
stream.Position = 0;

Expand All @@ -55,4 +55,4 @@ public static void Postfix(object message)
}
});
}
}
}
2 changes: 1 addition & 1 deletion DiscordLab.Bot/Commands/DiscordCommand.cs
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Discard changes to the whole file, there is still changes marked here.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I Discarded the changes idk why it still shows that I remove a "{" then added the "{" back

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need to discard the changes within github

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not that good, how do I do that

Original file line number Diff line number Diff line change
Expand Up @@ -158,4 +158,4 @@ await autocomplete.RespondAsync(Module.CurrentModules
.Where(x => x.Name != "DiscordLab.Bot" && x.Name.Contains((string)autocomplete.Data.Current.Value)).Take(25)
.Select(x => new AutocompleteResult($"{x.Name} (v{x.Version})", x.Name)));
}
}
}