Beispiel #1
0
 /// <summary>
 /// Called before the execution of a context menu in the module.
 /// </summary>
 /// <param name="ctx">The context.</param>
 /// <returns> Whether or not to execute the slash command. </returns>
 public virtual Task <bool> BeforeContextMenuExecutionAsync(ContextMenuContext ctx)
 => Task.FromResult(true);
Beispiel #2
0
 /// <summary>
 /// Called after the execution of a context menu in the module.
 /// </summary>
 /// <param name="ctx">The context.</param>
 /// <returns></returns>
 public virtual Task AfterContextMenuExecutionAsync(ContextMenuContext ctx)
 => Task.CompletedTask;
Beispiel #3
0
 /// <summary>
 /// Checks whether this command can be executed within the current context.
 /// </summary>
 /// <param name="ctx">The context.</param>
 /// <returns>Whether the checks passed.</returns>
 public abstract Task <bool> ExecuteChecksAsync(ContextMenuContext ctx);