This commit is contained in:
@@ -2,14 +2,15 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using DSharpPlus.CommandsNext;
|
||||
using DSharpPlus.CommandsNext.Attributes;
|
||||
using DSharpPlus.Commands;
|
||||
using DSharpPlus.Commands.ArgumentModifiers;
|
||||
using DSharpPlus.Commands.Processors.TextCommands;
|
||||
using DSharpPlus.Entities;
|
||||
|
||||
namespace LaDOSE.DiscordBot.Command
|
||||
{
|
||||
|
||||
public class Hokuto : BaseCommandModule
|
||||
public class Hokuto
|
||||
{
|
||||
|
||||
private static List<string> Games = new List<string> { "2X", "3.3", "Karnov" };
|
||||
@@ -21,14 +22,21 @@ namespace LaDOSE.DiscordBot.Command
|
||||
|
||||
|
||||
[Command("hokuto")]
|
||||
public async Task HokutoUserAsync(CommandContext ctx, params DiscordMember[] user)
|
||||
public async ValueTask HokutoUserAsync(TextCommandContext ctx)
|
||||
{
|
||||
|
||||
|
||||
var i = r.Next(0, 3);
|
||||
if (user!=null && user.Length>0)
|
||||
if (ctx.Message.MentionedUsers is { Count: 1 } )
|
||||
{
|
||||
await ctx.RespondAsync(ctx.User?.Mention + " vs " + user[0].Mention + " : " + Games[i].ToString());
|
||||
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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user