Class DiscordRespond
- Namespace
- BotManager.Discord.Expressions
- Assembly
- BotManager.Discord.dll
Responds with a text message on a DiscordSlashCommand. The DiscordInit must be initialized.
Return type is null.
null:
{ "$DiscordRespond": { "Message": "Got your command!" } }
public sealed class DiscordRespond : IExpression
- Inheritance
-
DiscordRespond
- Implements
- Inherited Members
Constructors
DiscordRespond()
public DiscordRespond()
Properties
AllowedMentions
Gets and sets if mentions are allowed.
public bool AllowedMentions { get; set; }
Property Value
Embed
Gets and sets the optional embed data for this message.
public DiscordEmbed? Embed { get; set; }
Property Value
Message
Gets and sets the expression to resolve the message.
public IExpression? Message { get; set; }
Property Value
Methods
ExecuteAsync(RuntimeContext, Type?)
Executes the expression in the given RuntimeContext. Please do not use this method to run an expression. Use ExecuteAsync(IExpression?) instead.
public Task<object?> ExecuteAsync(RuntimeContext context, Type? returnType)
Parameters
contextRuntimeContextThe current runtime context.
returnTypeTypeThe expected return type. Use
typeof(object)for a generic result. Usenullif you don't need the return value.