48 lines
1.2 KiB
C#
48 lines
1.2 KiB
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Threading;
|
|
using System.Threading.Tasks;
|
|
using DSharpPlus.Commands;
|
|
using DSharpPlus.Commands.ArgumentModifiers;
|
|
using DSharpPlus.Commands.Processors.TextCommands;
|
|
using DSharpPlus.Entities;
|
|
|
|
namespace LaDOSE.DiscordBot.Command
|
|
{
|
|
|
|
public class Hokuto
|
|
{
|
|
|
|
private static List<string> Games = new List<string> { "2X", "3.3", "Karnov" };
|
|
private static Random r = new Random();
|
|
public Hokuto()
|
|
{
|
|
|
|
}
|
|
|
|
|
|
[Command("hokuto")]
|
|
public async ValueTask HokutoUserAsync(TextCommandContext ctx)
|
|
{
|
|
|
|
|
|
var i = r.Next(0, 3);
|
|
if (ctx.Message.MentionedUsers is { Count: 1 } )
|
|
{
|
|
foreach (var arg in ctx.Message.MentionedUsers)
|
|
{
|
|
if (arg is DiscordUser member)
|
|
{
|
|
await ctx.RespondAsync(ctx.User?.Mention + " vs " + member.Mention + " : " + Games[i].ToString());
|
|
return;
|
|
}
|
|
}
|
|
}
|
|
else
|
|
{
|
|
await ctx.RespondAsync(ctx.User?.Mention + " : " + Games[i].ToString());
|
|
}
|
|
|
|
}
|
|
}
|
|
} |