Answers for "how to collect input from a user in discord bot c#"

C#
0

how to collect input from a user in discord bot c#

[Command("search")]
    public async Task Search(params string[] args)
    {
        if(args.Length == 0 || !int.TryParse(args[0], out int number))
        {
            await ReplyAsync("You have to enter a number!");
            return;
        }

        await ReplyAsync($"Your number is {number}.");
    }
Posted by: Guest on October-18-2021

Code answers related to "how to collect input from a user in discord bot c#"

C# Answers by Framework

Browse Popular Code Answers by Language