Skip to content

Commit

Permalink
log unknown events
Browse files Browse the repository at this point in the history
  • Loading branch information
RheaAyase committed Nov 4, 2024
1 parent bd9c909 commit 5f8eb12
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions Valkyrja-methods.cs
Original file line number Diff line number Diff line change
Expand Up @@ -104,6 +104,20 @@ public async Task LogMessage(LogType logType, SocketTextChannel channel, SocketM
await this.Events.LogEntryAdded(logEntry);
}

public async Task LogMessageUnknown(LogType logType, guid serverId, string message)
{
LogEntry logEntry = new LogEntry(){
Type = logType,
UserId = 0,
MessageId = 0,
ChannelId = 0,
ServerId = serverId,
DateTime = DateTime.UtcNow,
Message = message
};
await this.Events.LogEntryAdded(logEntry);
}

public async Task LogException(Exception exception, CommandArguments args) =>
await LogException(exception, "--Command: "+ args.Command.Id + " | Parameters: " + args.TrimmedMessage, args.Server.Id);

Expand Down

0 comments on commit 5f8eb12

Please sign in to comment.