Skip to content

Commit

Permalink
Fix eval command not working due to lack of visibility access
Browse files Browse the repository at this point in the history
  • Loading branch information
OoLunar committed May 2, 2024
1 parent 360b58d commit 585f7e2
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion src/Commands/Moderation/EvalCommand.cs
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,27 @@ namespace OoLunar.Tomoe.Commands.Moderation
/// </summary>
public static class EvalCommand
{
private sealed class EvalContext
/// <summary>
/// Allows the eval script to access contextual data.
/// </summary>
public sealed class EvalContext
{
/// <inheritdoc cref="EvalContext" />
public required CommandContext Context { get; init; }

/// <inheritdoc cref="EvalContext" />
public required CommandContext context { get; init; }

/// <summary>
/// Whether the returned response was transformed into JSON data or not.
/// </summary>
public bool IsJson { get; private set; }

/// <summary>
/// The data object to serialize into JSON data.
/// </summary>
/// <param name="obj">The object being read.</param>
/// <returns>The JSON data.</returns>
[return: NotNullIfNotNull(nameof(obj))]
public string? ToJson(object? obj)
{
Expand Down

0 comments on commit 585f7e2

Please sign in to comment.