using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
namespace DiscordLibrary;
public static class UsefulFunctions
{
public static async Task CreateResponse(InteractionContext ctx, string message, bool isEphemeral)
{
var responseBuilder = new DiscordInteractionResponseBuilder().WithContent(message);
if (isEphemeral)
responseBuilder.AsEphemeral();
await ctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource, responseBuilder);
}
}
using DSharpPlus;
using DSharpPlus.Entities;
using DSharpPlus.SlashCommands;
namespace DiscordLibrary;
public static class UsefulFunctions
{
public static async Task CreateResponse(InteractionContext ctx, string message, bool isEphemeral)
{
var responseBuilder = new DiscordInteractionResponseBuilder().WithContent(message);
if (isEphemeral)
responseBuilder.AsEphemeral();
await ctx.CreateResponseAsync(InteractionResponseType.ChannelMessageWithSource, responseBuilder);
}
}