This issue is super weird cause I have used modals in this way successfully before so I am not sure what could be wrong.
public async Task CustomDelete(IMessage msg)
{
try
{
_msg = msg;
await RespondWithModalAsync<CustomModel>("Custom");
}
catch (Exception e)
{
ErrorHelper.LogError(e);
}
}
public class CustomModel : IModal
{
public string Title => "Custom Delete";
[InputLabel("Reason")]
[ModalTextInput("reason", TextInputStyle.Paragraph,
"Descriptive reason for message deletion.", maxLength: 300)]
public string Reason { get; }
}
public async Task CustomModelTask(CustomModel modal)
{
try
{
await Moderation.Delete((SocketGuildUser)_msg.Author, modal.Reason, _msg, Context.User);
await RespondAsync($"Deleted message from <@{_msg.Author.Id}> | {_msg.Author.Username}#{_msg.Author.Discriminator}", null, false, true);
}
catch (Exception e)
{
ErrorHelper.LogError(e);
}
}





