t3k-dc-bot-cs/commands/napiszar.cs

25 lines
716 B
C#

using DSharpPlus.CommandsNext;
using DSharpPlus.CommandsNext.Attributes;
using System.Threading.Tasks;
using T3k3rg0.Helpers;
namespace T3k3rg0.Commands
{
public class Napiszar : BaseCommandModule
{
[Command("napiszar")]
[Description("Elküld egy napiszart.")]
public async Task GetNapiszar(CommandContext ctx)
{
if (NapiszarService.HasUsedToday(ctx.User.Id))
{
await ctx.RespondAsync("Ma már megkaptad a szarodat");
return;
}
string napiszar = NapiszarService.GetRandomSzar();
NapiszarService.LogUsage(ctx.User.Id);
await ctx.RespondAsync(napiszar);
}
}
}