コード例 #1
0
        public async Task CuteAt(int i)
        {
            int nr = i;

            if (i > (DataStorage.GetAnimalsCount() - 1))
            {
                await SendEmbeddedMessage("Error!", "That animal doesn't exist yet.\nRemember that the list is 0-index based, meaning that the latest animal is !cute_count **-1**");
            }

            await Context.Channel.SendMessageAsync($"{Context.User.Mention} picked cute animal #{i} \n {DataStorage.GetAnimalURL(nr)}");
        }
コード例 #2
0
        public async Task CuteRandom()
        {
            int max = DataStorage.GetAnimalsCount();

            Random random    = new Random();
            int    randomNum = random.Next(0, max);

            await Context.Channel.SendMessageAsync
            (
                $" {Context.User.Mention} requested a random cute image/video! This is animal #{randomNum}.\n" +
                $"{DataStorage.GetAnimalURL(randomNum)}"
            );
        }
コード例 #3
0
        public async Task CuteCount()
        {
            string title = $"The cutebank contains {DataStorage.GetAnimalsCount()} animals!";

            await SendEmbeddedMessage(title, "");
        }