Beispiel #1
0
        public async Task RemoveRoleSyncAsync(RexoProduct product)
        {
            await ReplyAsync($"Are you sure you want to remove `{product.Name}` from the sycning service? Reply yes/no");

            var response = await _responsive.WaitForMessageAsync((msg) =>
            {
                return(msg.Content.ToLower() == "yes");
            });

            if (response == null)
            {
                return;
            }

            _db.Remove(product);
            _db.SaveChanges();

            await ReplyAsync($"Successfully removed `{product.Name}` from the syncing service!");
        }