Example #1
0
        public async Task RenameWaifu(string oldName, string newName)
        {
            var waifu = await WaifuDb.GetWaifu(oldName);

            if (waifu == null)
            {
                await Context.Channel.SendMessageAsync($"**{oldName}** doesn't exist. *BAAAAAAAAAAAAAAAAAAKA*");

                return;
            }

            waifu = await WaifuDb.GetWaifu(newName);

            if (waifu != null)
            {
                await Context.Channel.SendMessageAsync($"**{newName}** already exists! *BAAAAAAAAAAAAAAAAAAKA*");

                return;
            }

            int res = await WaifuDb.RenameWaifu(oldName, newName);

            await Context.Channel.SendMessageAsync($"Replaced **{res}** **{oldName}** with their **{newName}** clones and burned the originals. *That was wild...*");
        }