26 lines
688 B
C#
26 lines
688 B
C#
using DSharpPlus.CommandsNext;
|
|
using DSharpPlus.CommandsNext.Attributes;
|
|
using System.Threading.Tasks;
|
|
using T3k3rg0.Helpers;
|
|
|
|
namespace T3k3rg0.Commands
|
|
{
|
|
public class Send : BaseCommandModule
|
|
{
|
|
[Command("send")]
|
|
[Description("Üzenetet küld ! send <csatorna> <szöveg>")]
|
|
[HasAdminRole]
|
|
public async Task SendAsync(CommandContext ctx, string channelInput, [RemainingText] string message)
|
|
{
|
|
var channel = await IdExtractor.ExtractChannelId(channelInput, ctx.Client);
|
|
|
|
if (channel == null)
|
|
{
|
|
return;
|
|
}
|
|
|
|
await channel.SendMessageAsync(message);
|
|
}
|
|
}
|
|
}
|
|
|